damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 1320ff6bec8fae0c03cdb66fba9d629b493e9cfe
parent 10cab372702d8528384986eafc4c161b771205ce
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 11 Apr 2023 14:52:11 -0700

Fix tabs sometimes not switching

This is the dumbest code I've ever written

Changelog-Fixed: Fix tabs sometimes not switching

Diffstat:
Mdamus/ContentView.swift | 3+++
Mdamus/Views/Notifications/NotificationsView.swift | 4++++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/damus/ContentView.swift b/damus/ContentView.swift @@ -96,6 +96,9 @@ struct ContentView: View { VStack { ZStack { TabView(selection: $filter_state) { + // This is needed or else there is a bug when switching from the 3rd or 2nd tab to first. no idea why. + Text("") + .id("what") contentTimelineView(filter: FilterState.posts.filter) .tag(FilterState.posts) .id(FilterState.posts) diff --git a/damus/Views/Notifications/NotificationsView.swift b/damus/Views/Notifications/NotificationsView.swift @@ -37,6 +37,10 @@ struct NotificationsView: View { var body: some View { TabView(selection: $filter_state) { + // This is needed or else there is a bug when switching from the 3rd or 2nd tab to first. no idea why. + Text("") + .id("what") + NotificationTab(NotificationFilterState.all) .tag(NotificationFilterState.all)