Fix duplicate path bug

This commit is contained in:
Lumaa 2024-08-10 17:32:41 +02:00
parent f52716f748
commit 37ea4c9b68
2 changed files with 8 additions and 5 deletions

View File

@ -62,11 +62,6 @@ struct ContentView: View {
.environment(huggingFace)
.environmentObject(preferences)
.navigationBarTitleDisplayMode(.inline)
.onChange(of: navigator.path) { _, newValue in
guard !newValue.isEmpty else { navigator.showTabbar = true; return }
navigator.showTabbar = newValue
.filter({ $0 == RouterDestination.settings }).first == nil
}
.onAppear {
showNew()

View File

@ -151,6 +151,14 @@ struct SettingsView: View {
.listThreaded()
.navigationTitle("settings")
.navigationBarTitleDisplayMode(.inline)
.onAppear {
navigator.showTabbar = false
}
.onChange(of: navigator.path) { _, newValue in
guard !newValue.isEmpty else { navigator.showTabbar = true; return }
navigator.showTabbar = newValue
.filter({ $0 == RouterDestination.settings }).first == nil
}
}
}