Fixes widgets potentially not updating after refreshing apps

This commit is contained in:
Riley Testut
2022-09-22 13:53:28 -05:00
committed by Joseph Mattello
parent 46b0d1ceac
commit 6d35a7a4ba

View File

@@ -1663,12 +1663,7 @@ private extension AppManager
if #available(iOS 14, *) if #available(iOS 14, *)
{ {
WidgetCenter.shared.getCurrentConfigurations { (result) in WidgetCenter.shared.reloadAllTimelines()
guard case .success(let widgets) = result else { return }
guard let widget = widgets.first(where: { $0.configuration is ViewAppIntent }) else { return }
WidgetCenter.shared.reloadTimelines(ofKind: widget.kind)
}
} }
do { try installedApp.managedObjectContext?.save() } do { try installedApp.managedObjectContext?.save() }