Fix iPad multitasking condition
This commit is contained in:
parent
fe4ca51820
commit
d6866e8e95
|
@ -31,14 +31,6 @@ extension View {
|
||||||
UIDevice.current.userInterfaceIdiom
|
UIDevice.current.userInterfaceIdiom
|
||||||
}
|
}
|
||||||
|
|
||||||
var themeIsiPad: Bool {
|
|
||||||
#if targetEnvironment(macCatalyst)
|
|
||||||
false
|
|
||||||
#else
|
|
||||||
UIDevice.current.userInterfaceIdiom == .pad
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
var themeIsiPadPortrait: Bool {
|
var themeIsiPadPortrait: Bool {
|
||||||
#if targetEnvironment(macCatalyst)
|
#if targetEnvironment(macCatalyst)
|
||||||
false
|
false
|
||||||
|
@ -48,8 +40,15 @@ extension View {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
var themeIsMultitasking: Bool {
|
var themeIsiPadMultitasking: Bool {
|
||||||
UIDevice.current.isMultitaskingSupported
|
#if targetEnvironment(macCatalyst)
|
||||||
|
false
|
||||||
|
#else
|
||||||
|
guard #available(iOS 15, *) else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return UIDevice.current.userInterfaceIdiom == .pad
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,10 @@ extension OrganizerView {
|
||||||
List {
|
List {
|
||||||
if profileManager.hasProfiles {
|
if profileManager.hasProfiles {
|
||||||
|
|
||||||
// FIXME: iPad multitasking, navigation binding does not clear on pop without Section
|
// FIXME: iPad multitasking, navigation binding does not clear on pop
|
||||||
if themeIsiPad && themeIsMultitasking {
|
// - if listStyle is different than .sidebar
|
||||||
|
// - if listStyle is .sidebar but List has no Section
|
||||||
|
if themeIsiPadMultitasking {
|
||||||
Section {
|
Section {
|
||||||
profilesView
|
profilesView
|
||||||
} header: {
|
} header: {
|
||||||
|
|
Loading…
Reference in New Issue