Always trigger switch timeline on tab press
This will dismiss views Changelog-Fixed: Fix bug where sometimes nested navigation views weren't dismissed when tapping the tab bar Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -311,13 +311,15 @@ struct ContentView: View {
|
||||
}
|
||||
|
||||
func switch_timeline(_ timeline: Timeline) {
|
||||
NotificationCenter.default.post(name: .switched_timeline, object: timeline)
|
||||
|
||||
if timeline == self.selected_timeline {
|
||||
NotificationCenter.default.post(name: .scroll_to_top, object: nil)
|
||||
return
|
||||
}
|
||||
|
||||
self.selected_timeline = timeline
|
||||
NotificationCenter.default.post(name: .switched_timeline, object: timeline)
|
||||
//NotificationCenter.default.post(name: .switched_timeline, object: timeline)
|
||||
//self.selected_timeline = timeline
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user