From 5d5da9e910bda4efb93a8db5d24347d9764a8b58 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Mon, 11 Sep 2023 12:03:25 -0500 Subject: [PATCH] Actually fixes interactive widget animation continuing indefinitely --- .../App Intents/RefreshAllAppsIntent.swift | 2 -- .../App Intents/RefreshAllAppsWidgetIntent.swift | 15 +++++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/AltStore/Intents/App Intents/RefreshAllAppsIntent.swift b/AltStore/Intents/App Intents/RefreshAllAppsIntent.swift index 5c5387c6..a56dcd1e 100644 --- a/AltStore/Intents/App Intents/RefreshAllAppsIntent.swift +++ b/AltStore/Intents/App Intents/RefreshAllAppsIntent.swift @@ -128,8 +128,6 @@ struct RefreshAllAppsIntent: AppIntent, CustomIntentMigratedAppIntent, Predictab } catch { - WidgetCenter.shared.reloadAllTimelines() - let intentError = IntentError(error) throw intentError } diff --git a/AltStore/Intents/App Intents/RefreshAllAppsWidgetIntent.swift b/AltStore/Intents/App Intents/RefreshAllAppsWidgetIntent.swift index 22ebe116..0045dc5f 100644 --- a/AltStore/Intents/App Intents/RefreshAllAppsWidgetIntent.swift +++ b/AltStore/Intents/App Intents/RefreshAllAppsWidgetIntent.swift @@ -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: "") } }