[Widgets]: Enhanced to isolate operations from multiple views of same widget type

This commit is contained in:
Magesh K
2025-01-11 03:25:25 +05:30
parent f69b293004
commit e29d9f7904
12 changed files with 346 additions and 245 deletions

View File

@@ -70,7 +70,7 @@ extension ComplicationView
@available(iOS 16, *)
private struct ComplicationView: View
{
let entry: AppsEntry
let entry: AppsEntry<Intent>
let style: Style
var body: some View {
@@ -144,10 +144,10 @@ private let widgetFamily = if #available(iOS 16, *) { WidgetFamily.accessoryCirc
let expiredDate = Date().addingTimeInterval(1 * 60 * 60 * 24 * 7)
let (altstore, _, _, longAltStore, _, _) = AppSnapshot.makePreviewSnapshots()
AppsEntry(date: Date(), apps: [altstore])
AppsEntry(date: Date(), apps: [longAltStore])
AppsEntry<Any>(date: Date(), apps: [altstore])
AppsEntry<Any>(date: Date(), apps: [longAltStore])
AppsEntry(date: expiredDate, apps: [altstore])
AppsEntry<Any>(date: expiredDate, apps: [altstore])
}
@available(iOS 17, *)
@@ -157,8 +157,8 @@ private let widgetFamily = if #available(iOS 16, *) { WidgetFamily.accessoryCirc
let expiredDate = Date().addingTimeInterval(1 * 60 * 60 * 24 * 7)
let (altstore, _, _, longAltStore, _, _) = AppSnapshot.makePreviewSnapshots()
AppsEntry(date: Date(), apps: [altstore])
AppsEntry(date: Date(), apps: [longAltStore])
AppsEntry<Any>(date: Date(), apps: [altstore])
AppsEntry<Any>(date: Date(), apps: [longAltStore])
AppsEntry(date: expiredDate, apps: [altstore])
AppsEntry<Any>(date: expiredDate, apps: [altstore])
}