16 lines
404 B
Swift
16 lines
404 B
Swift
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) }
|
|
}
|
|
}
|
|
}
|