mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
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:
@@ -48,6 +48,10 @@ class TimelineTableViewController: UIViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
applySnapshot()
|
applySnapshot()
|
||||||
|
|
||||||
|
if timelineItems.isEmpty {
|
||||||
|
paginateBackwardsPublisher.send()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,10 +45,6 @@ struct TimelineView: UIViewControllerRepresentable {
|
|||||||
|
|
||||||
init(viewModelContext: RoomScreenViewModel.Context) {
|
init(viewModelContext: RoomScreenViewModel.Context) {
|
||||||
context = viewModelContext
|
context = viewModelContext
|
||||||
|
|
||||||
if viewModelContext.viewState.items.isEmpty {
|
|
||||||
viewModelContext.send(viewAction: .paginateBackwards)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Updates the specified table view's properties from the current view state.
|
/// Updates the specified table view's properties from the current view state.
|
||||||
|
|||||||
Reference in New Issue
Block a user