Files
ios/MusicBridge/MusicBridgeApp.swift
T

16 lines
404 B
Swift
Raw Normal View History

2026-09-10 09:11:55 +03:00
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) }
}
}
}