cleanup some dubious code

This commit is contained in:
William Casarin
2023-04-11 14:21:48 -07:00
parent 2b2d124495
commit 179da97090
2 changed files with 7 additions and 8 deletions

View File

@@ -291,7 +291,7 @@ struct ContentView: View {
}
.navigationViewStyle(.stack)
TabBar(new_events: $home.new_events, selected: $selected_timeline, isSidebarVisible: $isSideBarOpened, settings: damus.settings, action: switch_timeline)
TabBar(new_events: $home.new_events, selected: $selected_timeline, settings: damus.settings, action: switch_timeline)
.padding([.bottom], 8)
.background(Color(uiColor: .systemBackground).ignoresSafeArea())
}
@@ -570,6 +570,8 @@ struct ContentView: View {
}
func switch_timeline(_ timeline: Timeline) {
self.isSideBarOpened = false
self.popToRoot()
NotificationCenter.default.post(name: .switched_timeline, object: timeline)