mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-30 01:38:07 +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)
|
StatusEditHistoryView(statusId: status)
|
||||||
.withEnvironments()
|
.withEnvironments()
|
||||||
case .settings:
|
case .settings:
|
||||||
SettingsTabs(popToRootTab: .constant(.settings))
|
SettingsTabs(popToRootTab: .constant(.settings), isModal: true)
|
||||||
.withEnvironments()
|
.withEnvironments()
|
||||||
.preferredColorScheme(Theme.shared.selectedScheme == .dark ? .dark : .light)
|
.preferredColorScheme(Theme.shared.selectedScheme == .dark ? .dark : .light)
|
||||||
case .accountPushNotficationsSettings:
|
case .accountPushNotficationsSettings:
|
||||||
|
|
|
@ -29,6 +29,8 @@ struct SettingsTabs: View {
|
||||||
@State private var timelineCache = TimelineCache()
|
@State private var timelineCache = TimelineCache()
|
||||||
|
|
||||||
@Binding var popToRootTab: Tab
|
@Binding var popToRootTab: Tab
|
||||||
|
|
||||||
|
let isModal: Bool
|
||||||
|
|
||||||
@Query(sort: \LocalTimeline.creationDate, order: .reverse) var localTimelines: [LocalTimeline]
|
@Query(sort: \LocalTimeline.creationDate, order: .reverse) var localTimelines: [LocalTimeline]
|
||||||
@Query(sort: \TagGroup.creationDate, order: .reverse) var tagGroups: [TagGroup]
|
@Query(sort: \TagGroup.creationDate, order: .reverse) var tagGroups: [TagGroup]
|
||||||
|
@ -48,7 +50,7 @@ struct SettingsTabs: View {
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
.toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar)
|
.toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
if UIDevice.current.userInterfaceIdiom == .phone {
|
if UIDevice.current.userInterfaceIdiom == .phone || isModal {
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
Button {
|
Button {
|
||||||
dismiss()
|
dismiss()
|
||||||
|
|
|
@ -47,7 +47,7 @@ enum Tab: Int, Identifiable, Hashable {
|
||||||
case .messages:
|
case .messages:
|
||||||
MessagesTab(popToRootTab: popToRootTab)
|
MessagesTab(popToRootTab: popToRootTab)
|
||||||
case .settings:
|
case .settings:
|
||||||
SettingsTabs(popToRootTab: popToRootTab)
|
SettingsTabs(popToRootTab: popToRootTab, isModal: false)
|
||||||
case .profile:
|
case .profile:
|
||||||
ProfileTab(popToRootTab: popToRootTab)
|
ProfileTab(popToRootTab: popToRootTab)
|
||||||
case .other:
|
case .other:
|
||||||
|
|
Loading…
Reference in a new issue