This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct MusicBridgeApp: App {
|
||||
@StateObject private var store = PlayerStore()
|
||||
@Environment(\.scenePhase) private var phase
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView(store: store)
|
||||
.task { store.setActive(phase == .active) }
|
||||
.onChange(of: phase) { _, value in store.setActive(value == .active) }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user