Refresh native pairing and player UI and add the MusicBridge app icon
This commit is contained in:
@@ -2,15 +2,16 @@ import SwiftUI
|
||||
|
||||
@main
|
||||
struct MusicBridgeApp: App {
|
||||
@StateObject private var store = PlayerStore()
|
||||
@StateObject private var store = PreviewSupport.makeStore()
|
||||
@Environment(\.scenePhase) private var phase
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView(store: store)
|
||||
.dynamicTypeSize(PreviewSupport.largeText ? DynamicTypeSize.accessibility2...DynamicTypeSize.accessibility2 : DynamicTypeSize.xSmall...DynamicTypeSize.accessibility5)
|
||||
.onOpenURL { store.importInvitation($0.absoluteString) }
|
||||
.task { store.setActive(phase == .active) }
|
||||
.onChange(of: phase) { _, value in store.setActive(value == .active) }
|
||||
.task { if !PreviewSupport.enabled { store.setActive(phase == .active) } }
|
||||
.onChange(of: phase) { _, value in if !PreviewSupport.enabled { store.setActive(value == .active) } }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user