Actually fixes interactive widget animation continuing indefinitely

This commit is contained in:
Riley Testut
2023-09-11 12:03:25 -05:00
committed by Magesh K
parent a341a15a5e
commit 5d5da9e910
2 changed files with 11 additions and 6 deletions

View File

@@ -128,8 +128,6 @@ struct RefreshAllAppsIntent: AppIntent, CustomIntentMigratedAppIntent, Predictab
}
catch
{
WidgetCenter.shared.reloadAllTimelines()
let intentError = IntentError(error)
throw intentError
}

View File

@@ -20,11 +20,18 @@ struct RefreshAllAppsWidgetIntent: AppIntent, ProgressReportingIntent
func perform() async throws -> some IntentResult & ProvidesDialog
{
#if WIDGET_EXTENSION
return .result(dialog: "")
#else
return try await self.intent.perform()
#if !WIDGET_EXTENSION
do
{
_ = try await self.intent.perform()
}
catch
{
print("Failed to refresh apps via widget.", error)
}
#endif
return .result(dialog: "")
}
}