mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-16 02:03:32 +01:00
[AltWidget] Fixes compiling for iOS 16 and earlier
Also fixes unused variable warnings.
This commit is contained in:
@@ -147,6 +147,7 @@ private struct ActiveAppsWidgetView: View
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@available(iOS 17, *)
|
||||||
#Preview(as: .systemMedium) {
|
#Preview(as: .systemMedium) {
|
||||||
return ActiveAppsWidget()
|
return ActiveAppsWidget()
|
||||||
} timeline: {
|
} timeline: {
|
||||||
|
|||||||
@@ -171,11 +171,12 @@ private extension AppDetailWidgetView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@available(iOS 17, *)
|
||||||
#Preview(as: .systemSmall) {
|
#Preview(as: .systemSmall) {
|
||||||
AppDetailWidget()
|
AppDetailWidget()
|
||||||
} timeline: {
|
} timeline: {
|
||||||
let expiredDate = Date().addingTimeInterval(1 * 60 * 60 * 24 * 7)
|
let expiredDate = Date().addingTimeInterval(1 * 60 * 60 * 24 * 7)
|
||||||
let (altstore, delta, clip, _, longDelta, _) = AppSnapshot.makePreviewSnapshots()
|
let (altstore, delta, _, _, longDelta, _) = AppSnapshot.makePreviewSnapshots()
|
||||||
|
|
||||||
AppsEntry(date: Date(), apps: [altstore])
|
AppsEntry(date: Date(), apps: [altstore])
|
||||||
AppsEntry(date: Date(), apps: [delta])
|
AppsEntry(date: Date(), apps: [delta])
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ private struct ComplicationView: View
|
|||||||
|
|
||||||
private let widgetFamily = if #available(iOS 16, *) { WidgetFamily.accessoryCircular } else { WidgetFamily.systemSmall }
|
private let widgetFamily = if #available(iOS 16, *) { WidgetFamily.accessoryCircular } else { WidgetFamily.systemSmall }
|
||||||
|
|
||||||
|
@available(iOS 17, *)
|
||||||
#Preview("Text", as: widgetFamily) {
|
#Preview("Text", as: widgetFamily) {
|
||||||
TextLockScreenWidget()
|
TextLockScreenWidget()
|
||||||
} timeline: {
|
} timeline: {
|
||||||
@@ -148,6 +149,7 @@ private let widgetFamily = if #available(iOS 16, *) { WidgetFamily.accessoryCirc
|
|||||||
AppsEntry(date: expiredDate, apps: [altstore])
|
AppsEntry(date: expiredDate, apps: [altstore])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@available(iOS 17, *)
|
||||||
#Preview("Icon", as: widgetFamily) {
|
#Preview("Icon", as: widgetFamily) {
|
||||||
IconLockScreenWidget()
|
IconLockScreenWidget()
|
||||||
} timeline: {
|
} timeline: {
|
||||||
|
|||||||
Reference in New Issue
Block a user