Fix issue with loading view using the redacted modifier

Also tried to make some adjusmtents to the refresh subscribtion to see
if this fixes bugs people were having

Closes: #119

Changelog-Fixed: Fixed issues when refreshing global view
This commit is contained in:
Sam DuBois
2022-12-22 17:23:55 -07:00
committed by William Casarin
parent 514d9f4201
commit 549cbb9bce
6 changed files with 62 additions and 54 deletions

View File

@@ -42,7 +42,8 @@ struct SearchHomeView: View {
var GlobalContent: some View {
return TimelineView(events: $model.events, loading: $model.loading, damus: damus_state, show_friend_icon: true, filter: { _ in true })
.refreshable {
// Fetch new information by resubscribing to the relay
// Fetch new information by unsubscribing and resubscribing to the relay
model.unsubscribe()
model.subscribe()
}
}
@@ -50,7 +51,8 @@ struct SearchHomeView: View {
var SearchContent: some View {
SearchResultsView(damus_state: damus_state, search: $search)
.refreshable {
// Fetch new information by resubscribing to the relay
// Fetch new information by unsubscribing and resubscribing to the relay
model.unsubscribe()
model.subscribe()
}
}
@@ -68,9 +70,7 @@ struct SearchHomeView: View {
@Environment(\.colorScheme) var colorScheme
var body: some View {
VStack {
MainContent
}
MainContent
.safeAreaInset(edge: .top) {
VStack(spacing: 0) {
SearchInput