diff options
| author | Fuwn <[email protected]> | 2025-06-14 21:59:32 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-14 21:59:32 -0700 |
| commit | 79304518db513658991f888236dd2dc8003cb235 (patch) | |
| tree | d0eaa6619fb48c16d8d0bf4e8b6e8017572f876b /Sora/App | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-79304518db513658991f888236dd2dc8003cb235.tar.xz sora-testing-79304518db513658991f888236dd2dc8003cb235.zip | |
feat: Development commit
Diffstat (limited to 'Sora/App')
| -rw-r--r-- | Sora/App/SoraApp.swift | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Sora/App/SoraApp.swift b/Sora/App/SoraApp.swift index cea526f..8fdfb4d 100644 --- a/Sora/App/SoraApp.swift +++ b/Sora/App/SoraApp.swift @@ -14,6 +14,12 @@ func debugPrint( struct SoraApp: App { @StateObject private var settings = SettingsManager() + @ViewBuilder + private func settingsContent() -> some View { + SettingsView() + .environmentObject(settings) + } + var body: some Scene { WindowGroup { MainView() @@ -22,9 +28,12 @@ struct SoraApp: App { #if os(macOS) SwiftUI.Settings { - SettingsView() - .environmentObject(settings) - .windowResizeBehavior(.enabled) + if #available(macOS 15.0, *) { + settingsContent() + .windowResizeBehavior(.enabled) + } else { + settingsContent() + } } #endif } |