diff --git a/IceCubesApp/App/AppRegistry.swift b/IceCubesApp/App/AppRegistry.swift index f5eb7a83..3f146046 100644 --- a/IceCubesApp/App/AppRegistry.swift +++ b/IceCubesApp/App/AppRegistry.swift @@ -101,7 +101,7 @@ extension View { StatusEditHistoryView(statusId: status) .withEnvironments() case .settings: - SettingsTabs(popToRootTab: .constant(.settings)) + SettingsTabs(popToRootTab: .constant(.settings), isModal: true) .withEnvironments() .preferredColorScheme(Theme.shared.selectedScheme == .dark ? .dark : .light) case .accountPushNotficationsSettings: diff --git a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift index c457f0d8..51919154 100644 --- a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift +++ b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift @@ -29,6 +29,8 @@ struct SettingsTabs: View { @State private var timelineCache = TimelineCache() @Binding var popToRootTab: Tab + + let isModal: Bool @Query(sort: \LocalTimeline.creationDate, order: .reverse) var localTimelines: [LocalTimeline] @Query(sort: \TagGroup.creationDate, order: .reverse) var tagGroups: [TagGroup] @@ -48,7 +50,7 @@ struct SettingsTabs: View { .navigationBarTitleDisplayMode(.inline) .toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar) .toolbar { - if UIDevice.current.userInterfaceIdiom == .phone { + if UIDevice.current.userInterfaceIdiom == .phone || isModal { ToolbarItem { Button { dismiss() diff --git a/IceCubesApp/App/Tabs/Tabs.swift b/IceCubesApp/App/Tabs/Tabs.swift index 38c265bc..df675ea1 100644 --- a/IceCubesApp/App/Tabs/Tabs.swift +++ b/IceCubesApp/App/Tabs/Tabs.swift @@ -47,7 +47,7 @@ enum Tab: Int, Identifiable, Hashable { case .messages: MessagesTab(popToRootTab: popToRootTab) case .settings: - SettingsTabs(popToRootTab: popToRootTab) + SettingsTabs(popToRootTab: popToRootTab, isModal: false) case .profile: ProfileTab(popToRootTab: popToRootTab) case .other: