From 806c6257dfe95bffe014c33efe5d79998e57f916 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Wed, 12 Apr 2023 20:02:26 -0700 Subject: [PATCH] A few more performance tweaks --- damus/ContentView.swift | 11 ++++++++--- damus/Views/Notifications/NotificationsView.swift | 13 ++++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/damus/ContentView.swift b/damus/ContentView.swift index a8ace059..22ffde65 100644 --- a/damus/ContentView.swift +++ b/damus/ContentView.swift @@ -91,14 +91,19 @@ struct ContentView: View { let sub_id = UUID().description @Environment(\.colorScheme) var colorScheme - + + var mystery: some View { + Text("Are you lost?") + .id("what") + } + var PostingTimelineView: some 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") + mystery + 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 index 4ead4fbd..e7365305 100644 --- a/damus/Views/Notifications/NotificationsView.swift +++ b/damus/Views/Notifications/NotificationsView.swift @@ -35,12 +35,19 @@ struct NotificationsView: View { @Environment(\.colorScheme) var colorScheme + var mystery: some View { + VStack(spacing: 20) { + Text("Wake up \(Profile.displayName(profile: state.profiles.lookup(id: state.pubkey), pubkey: state.pubkey).display_name)") + Text("You are dreaming...") + } + .id("what") + } + var body: some View { TabView(selection: $filter_state) { + mystery + // 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)