Fix app launching on macOS (but no QuickLook for now)

This commit is contained in:
Thomas Ricouard 2023-01-05 20:20:48 +01:00
parent 972eef0ddd
commit 36d8449cea

View file

@ -41,7 +41,6 @@ struct IceCubesApp: App {
.environmentObject(currentInstance)
.environmentObject(theme)
.environmentObject(watcher)
.quickLookPreview($quickLook.url, in: quickLook.urls)
}
.onChange(of: scenePhase, perform: { scenePhase in
handleScenePhase(scenePhase: scenePhase)
@ -60,9 +59,15 @@ struct IceCubesApp: App {
@ViewBuilder
private var appView: some View {
if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac {
if ProcessInfo.processInfo.isiOSAppOnMac {
splitView
} else {
splitView
.quickLookPreview($quickLook.url, in: quickLook.urls)
}
} else {
tabBarView
.quickLookPreview($quickLook.url, in: quickLook.urls)
}
}