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 21bd37c0b1
commit 252a5f2bdc
2 changed files with 4 additions and 4 deletions
@@ -48,6 +48,10 @@ class TimelineTableViewController: UIViewController {
}
applySnapshot()
if timelineItems.isEmpty {
paginateBackwardsPublisher.send()
}
}
}
@@ -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.