mirror of
https://github.com/lumaa-dev/BubbleApp.git
synced 2024-12-26 16:55:15 +01:00
Fix <iOS 18 widgets
This commit is contained in:
parent
896e131cf5
commit
252780a1aa
@ -7,12 +7,30 @@ import UIKit
|
||||
@main
|
||||
struct BubbleWidgetsBundle: WidgetBundle {
|
||||
var body: some Widget {
|
||||
if #available(iOSApplicationExtension 18.0, *) {
|
||||
return NewBundle
|
||||
} else {
|
||||
return PrevBundle
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 18.0, *)
|
||||
@WidgetBundleBuilder
|
||||
private var NewBundle: some Widget {
|
||||
FollowCountWidget()
|
||||
FollowGoalWidget()
|
||||
CreatePostWidget()
|
||||
|
||||
if #available(iOS 18.0, *) {
|
||||
CreatePostControl()
|
||||
}
|
||||
// iOS 18
|
||||
CreatePostControl()
|
||||
}
|
||||
|
||||
@WidgetBundleBuilder
|
||||
private var PrevBundle: some Widget {
|
||||
FollowCountWidget()
|
||||
FollowGoalWidget()
|
||||
CreatePostWidget()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user