mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
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:
@@ -55,7 +55,7 @@ struct MockRoomProxy: RoomProxyProtocol {
|
||||
.failure(.failedAddingTimelineListener)
|
||||
}
|
||||
|
||||
func paginateBackwards(count: UInt) async -> Result<Void, RoomProxyError> {
|
||||
func paginateBackwards(count: UInt) async -> Result<UInt, RoomProxyError> {
|
||||
.failure(.failedPaginatingBackwards)
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ class RoomProxy: RoomProxyProtocol {
|
||||
// }
|
||||
}
|
||||
|
||||
func paginateBackwards(count: UInt) async -> Result<Void, RoomProxyError> {
|
||||
func paginateBackwards(count: UInt) async -> Result<UInt, RoomProxyError> {
|
||||
guard backPaginationOutcome?.moreMessages != false else {
|
||||
return .failure(.noMoreMessagesToBackPaginate)
|
||||
}
|
||||
@@ -152,7 +152,7 @@ class RoomProxy: RoomProxyProtocol {
|
||||
try self.room.paginateBackwards(limit: UInt16(count))
|
||||
}
|
||||
update(backPaginationOutcome: outcome)
|
||||
return .success(())
|
||||
return .success(UInt(outcome.numUpdates))
|
||||
} catch {
|
||||
return .failure(.failedPaginatingBackwards)
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ protocol RoomProxyProtocol {
|
||||
|
||||
func addTimelineListener(listener: TimelineListener) -> Result<Void, RoomProxyError>
|
||||
|
||||
func paginateBackwards(count: UInt) async -> Result<Void, RoomProxyError>
|
||||
func paginateBackwards(count: UInt) async -> Result<UInt, RoomProxyError>
|
||||
|
||||
func sendMessage(_ message: String, inReplyToEventId: String?) async -> Result<Void, RoomProxyError>
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
// MARK: - Private
|
||||
|
||||
fileprivate func updateRoomsWithDiffs(_ diffs: [SlidingSyncViewRoomsListDiff]) {
|
||||
MXLog.info("Received diffs")
|
||||
MXLog.info("Received \(diffs.count) diffs")
|
||||
|
||||
rooms = diffs
|
||||
.reduce(rooms) { currentItems, diff in
|
||||
|
||||
Reference in New Issue
Block a user