From 71ec18f6c6f30a0aaab6088b15c430ab69ae5c20 Mon Sep 17 00:00:00 2001 From: Terry Yiu Date: Tue, 25 Feb 2025 09:21:31 -0500 Subject: [PATCH] Remove mystery tabs meant to fix tab switching bug that no longer exists Changelog-Removed: Removed mystery tabs meant to fix tab switching bug that no longer exists Signed-off-by: Terry Yiu --- damus/Views/Notifications/NotificationsView.swift | 13 ------------- damus/Views/Timeline/PostingTimelineView.swift | 8 -------- 2 files changed, 21 deletions(-) diff --git a/damus/Views/Notifications/NotificationsView.swift b/damus/Views/Notifications/NotificationsView.swift index 309513ea..1d7a6c07 100644 --- a/damus/Views/Notifications/NotificationsView.swift +++ b/damus/Views/Notifications/NotificationsView.swift @@ -60,21 +60,8 @@ struct NotificationsView: View { @Environment(\.colorScheme) var colorScheme - var mystery: some View { - let profile_txn = state.profiles.lookup(id: state.pubkey) - let profile = profile_txn?.unsafeUnownedValue - return VStack(spacing: 20) { - Text("Wake up, \(Profile.displayName(profile: profile, pubkey: state.pubkey).displayName.truncate(maxLength: 50))", comment: "Text telling the user to wake up, where the argument is their display name.") - Text("You are dreaming...", comment: "Text telling the user that they are dreaming.") - } - .id("what") - } - 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. - mystery - NotificationTab( NotificationFilter( state: .all, diff --git a/damus/Views/Timeline/PostingTimelineView.swift b/damus/Views/Timeline/PostingTimelineView.swift index a8ea05fa..8a37b5be 100644 --- a/damus/Views/Timeline/PostingTimelineView.swift +++ b/damus/Views/Timeline/PostingTimelineView.swift @@ -25,11 +25,6 @@ struct PostingTimelineView: View { @State var headerHeight: CGFloat = 0 @Binding var headerOffset: CGFloat @SceneStorage("PostingTimelineView.filter_state") var filter_state : FilterState = .posts_and_replies - - var mystery: some View { - Text("Are you lost?", comment: "Text asking the user if they are lost in the app.") - .id("what") - } func content_filter(_ fstate: FilterState) -> ((NostrEvent) -> Bool) { var filters = ContentFilters.defaults(damus_state: damus_state) @@ -95,9 +90,6 @@ struct PostingTimelineView: 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. - mystery - contentTimelineView(filter: content_filter(.posts)) .tag(FilterState.posts) .id(FilterState.posts)