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:
@@ -39,11 +39,19 @@ struct SearchHomeView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var GlobalContent: some 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 {
|
var SearchContent: some View {
|
||||||
SearchResultsView(damus_state: damus_state, search: $search)
|
SearchResultsView(damus_state: damus_state, search: $search)
|
||||||
|
.refreshable {
|
||||||
|
// Fetch new information by resubscribing to the relay
|
||||||
|
model.subscribe()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var MainContent: some View {
|
var MainContent: some View {
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ struct InnerTimelineView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
.refreshable {
|
|
||||||
print("Hello World")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,6 +57,9 @@ struct InnerTimelineRedactedView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct TimelineView: View {
|
struct TimelineView: View {
|
||||||
|
|
||||||
|
@EnvironmentObject var viewModel: DamusViewModel
|
||||||
|
|
||||||
@Binding var events: [NostrEvent]
|
@Binding var events: [NostrEvent]
|
||||||
@Binding var loading: Bool
|
@Binding var loading: Bool
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user