Fix tabs sometimes not switching
This is the dumbest code I've ever written Changelog-Fixed: Fix tabs sometimes not switching
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user