Fix stuck timeline pagination because of too many membership events

Requires https://github.com/matrix-org/matrix-rust-sdk/pull/1314
This commit is contained in:
manuroe
2023-01-03 09:11:20 +01:00
committed by Stefan Ceriu
parent 9ca7f4cb4d
commit 461895e8df
6 changed files with 12 additions and 7 deletions
@@ -72,8 +72,12 @@ class RoomTimelineProvider: RoomTimelineProviderProtocol {
MXLog.info("Started back pagination request")
switch await roomProxy.paginateBackwards(count: count) {
case .success:
MXLog.info("Finished back pagination request")
case .success(let numUpdates):
MXLog.info("Finished back pagination request. Got \(numUpdates) updates")
if numUpdates == 0 {
backPaginationPublisher.send(false)
}
return .success(())
case .failure(let error):
MXLog.error("Failed back pagination request with error: \(error)")