Sliding sync session reset manual backpagination (#628)

* Force a timeline backpagination when the app becomes active again in case the sliding sync session expires and it no longer shows any items

* Better way to load up timeline items when empty
This commit is contained in:
Stefan Ceriu
2023-02-24 14:41:44 +02:00
committed by GitHub
parent 5580e5c118
commit a1300d0b82
2 changed files with 4 additions and 4 deletions

View File

@@ -48,6 +48,10 @@ class TimelineTableViewController: UIViewController {
}
applySnapshot()
if timelineItems.isEmpty {
paginateBackwardsPublisher.send()
}
}
}

View File

@@ -45,10 +45,6 @@ struct TimelineView: UIViewControllerRepresentable {
init(viewModelContext: RoomScreenViewModel.Context) {
context = viewModelContext
if viewModelContext.viewState.items.isEmpty {
viewModelContext.send(viewAction: .paginateBackwards)
}
}
/// Updates the specified table view's properties from the current view state.