Realized that I didn't actually need to move everything out into a view model. Well oh well im sure it will come in handy eventually

This commit is contained in:
Sam DuBois
2022-12-18 18:35:03 -07:00
parent 5d0e5c32ed
commit 2906fecf5c
2 changed files with 12 additions and 4 deletions

View File

@@ -39,11 +39,19 @@ struct SearchHomeView: View {
}
var GlobalContent: some View {
TimelineView(events: $model.events, loading: $model.loading, damus: damus_state, show_friend_icon: true, filter: { _ in true })
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
model.subscribe()
}
}
var SearchContent: some View {
SearchResultsView(damus_state: damus_state, search: $search)
.refreshable {
// Fetch new information by resubscribing to the relay
model.subscribe()
}
}
var MainContent: some View {

View File

@@ -34,9 +34,6 @@ struct InnerTimelineView: View {
}
}
.padding(.horizontal)
.refreshable {
print("Hello World")
}
}
}
@@ -60,6 +57,9 @@ struct InnerTimelineRedactedView: View {
}
struct TimelineView: View {
@EnvironmentObject var viewModel: DamusViewModel
@Binding var events: [NostrEvent]
@Binding var loading: Bool