[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

@@ -39,7 +39,7 @@ struct AppDetailWidget: Widget
private struct AppDetailWidgetView: View
{
var entry: AppsEntry
var entry: AppsEntry<Intent>
var body: some View {
Group {
@@ -200,11 +200,11 @@ private extension AppDetailWidgetView
} timeline: {
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])
AppsEntry(date: Date(), apps: [])
AppsEntry(date: Date(), apps: [], isPlaceholder: true)
AppsEntry<Any>(date: Date(), apps: [])
AppsEntry<Any>(date: Date(), apps: [], isPlaceholder: true)
}