A few more performance tweaks
This commit is contained in:
@@ -91,14 +91,19 @@ struct ContentView: View {
|
|||||||
let sub_id = UUID().description
|
let sub_id = UUID().description
|
||||||
|
|
||||||
@Environment(\.colorScheme) var colorScheme
|
@Environment(\.colorScheme) var colorScheme
|
||||||
|
|
||||||
|
var mystery: some View {
|
||||||
|
Text("Are you lost?")
|
||||||
|
.id("what")
|
||||||
|
}
|
||||||
|
|
||||||
var PostingTimelineView: some View {
|
var PostingTimelineView: some View {
|
||||||
VStack {
|
VStack {
|
||||||
ZStack {
|
ZStack {
|
||||||
TabView(selection: $filter_state) {
|
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.
|
// This is needed or else there is a bug when switching from the 3rd or 2nd tab to first. no idea why.
|
||||||
Text("")
|
mystery
|
||||||
.id("what")
|
|
||||||
contentTimelineView(filter: FilterState.posts.filter)
|
contentTimelineView(filter: FilterState.posts.filter)
|
||||||
.tag(FilterState.posts)
|
.tag(FilterState.posts)
|
||||||
.id(FilterState.posts)
|
.id(FilterState.posts)
|
||||||
|
|||||||
@@ -35,12 +35,19 @@ struct NotificationsView: View {
|
|||||||
|
|
||||||
@Environment(\.colorScheme) var colorScheme
|
@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 {
|
var body: some View {
|
||||||
TabView(selection: $filter_state) {
|
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.
|
// 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)
|
NotificationTab(NotificationFilterState.all)
|
||||||
.tag(NotificationFilterState.all)
|
.tag(NotificationFilterState.all)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user