Only use wrapping Section to fix iPad multitasking

This commit is contained in:
Davide De Rosa 2022-05-03 12:48:43 +02:00
parent 3c0e511e84
commit 8230666ab2
1 changed files with 3 additions and 5 deletions

View File

@ -89,17 +89,15 @@ extension OrganizerView {
private var mainView: some View {
List {
if profileManager.hasProfiles {
switch themeIdiom {
case .mac:
profilesView
default:
if #available(iOS 15, *), themeIdiom == .pad {
// FIXME: iPad multitasking, navigation binding does not clear on pop without Section
Section {
profilesView
} header: {
Text(L10n.Global.Strings.profiles)
}
} else {
profilesView
}
}
}.themeAnimation(on: profileManager.headers)