mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-28 16:58:15 +00:00
Fix settings close button
This commit is contained in:
parent
c1c7c666cb
commit
1e35ffb82b
3 changed files with 5 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue