fixed UI scaling with new info.plist
This commit is contained in:
parent
311cfdb3d4
commit
507ae52e9c
1 changed files with 8 additions and 13 deletions
|
|
@ -99,26 +99,21 @@ class AppDelegate: NSObject, UIApplicationDelegate {
|
|||
@main
|
||||
struct NavidromePlayerApp: App {
|
||||
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
|
||||
|
||||
@StateObject private var serverManager = ServerManager.shared
|
||||
@StateObject private var audioPlayer = AudioPlayer.shared
|
||||
@StateObject private var offlineManager = OfflineManager.shared
|
||||
|
||||
|
||||
// Initialize WatchConnectivity so sync works immediately
|
||||
private let watchConnectivity = WatchConnectivityManager.shared
|
||||
|
||||
|
||||
init() {
|
||||
// Dismiss keyboard when scrolling any scroll view
|
||||
UIScrollView.appearance().keyboardDismissMode = .interactive
|
||||
}
|
||||
|
||||
|
||||
var body: some Scene {
|
||||
// NavidromeSceneDelegate owns the UIWindow and RootView entirely.
|
||||
// WindowGroup must exist to satisfy the @main App protocol, but must
|
||||
// NOT render RootView again — that would create a second UIWindow on
|
||||
// top of the delegate's window, causing safe-area/scaling bugs app-wide.
|
||||
WindowGroup {
|
||||
RootView()
|
||||
.environmentObject(serverManager)
|
||||
.environmentObject(audioPlayer)
|
||||
.environmentObject(offlineManager)
|
||||
.tint(Color(red: 1.0, green: 0.176, blue: 0.333)) // iOS 8 Music pink
|
||||
Color.clear.frame(width: 0, height: 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue