A few more performance tweaks

This commit is contained in:
William Casarin
2023-04-12 20:02:26 -07:00
parent 18aafb086e
commit 806c6257df
2 changed files with 18 additions and 6 deletions

View File

@@ -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)

View File

@@ -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)