mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-11 08:35:26 +00:00
Fix app launching on macOS (but no QuickLook for now)
This commit is contained in:
parent
972eef0ddd
commit
36d8449cea
1 changed files with 7 additions and 2 deletions
|
@ -41,7 +41,6 @@ struct IceCubesApp: App {
|
||||||
.environmentObject(currentInstance)
|
.environmentObject(currentInstance)
|
||||||
.environmentObject(theme)
|
.environmentObject(theme)
|
||||||
.environmentObject(watcher)
|
.environmentObject(watcher)
|
||||||
.quickLookPreview($quickLook.url, in: quickLook.urls)
|
|
||||||
}
|
}
|
||||||
.onChange(of: scenePhase, perform: { scenePhase in
|
.onChange(of: scenePhase, perform: { scenePhase in
|
||||||
handleScenePhase(scenePhase: scenePhase)
|
handleScenePhase(scenePhase: scenePhase)
|
||||||
|
@ -60,9 +59,15 @@ struct IceCubesApp: App {
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private var appView: some View {
|
private var appView: some View {
|
||||||
if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac {
|
if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac {
|
||||||
splitView
|
if ProcessInfo.processInfo.isiOSAppOnMac {
|
||||||
|
splitView
|
||||||
|
} else {
|
||||||
|
splitView
|
||||||
|
.quickLookPreview($quickLook.url, in: quickLook.urls)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
tabBarView
|
tabBarView
|
||||||
|
.quickLookPreview($quickLook.url, in: quickLook.urls)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue