Add a "load more" button instead of always inserting events in timelines

Changelog-Added: Add a "load more" button instead of always inserting events in timelines
This commit is contained in:
William Casarin
2023-02-20 09:11:39 -08:00
parent 795577a0a1
commit b4140dc5f2
15 changed files with 322 additions and 94 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ 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 })
return TimelineView(events: model.events, loading: $model.loading, damus: damus_state, show_friend_icon: true, filter: { _ in true })
.refreshable {
// Fetch new information by unsubscribing and resubscribing to the relay
model.unsubscribe()
@@ -90,7 +90,7 @@ struct SearchHomeView: View {
self.model.filter_muted()
}
.onAppear {
if model.events.isEmpty {
if model.events.events.isEmpty {
model.subscribe()
}
}