From bde50f8d676253c84160e1a662f42539f242f38b Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Wed, 23 Aug 2023 19:16:30 +0300 Subject: [PATCH] Revert "Split incoming large .resets into a reset + append in order to quicker update the UI" This reverts commit 7b9f6d253edaa5b4f8a2786b9a3801d87cc666ce. --- .../RoomSummary/RoomSummaryProvider.swift | 37 +++++++------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift b/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift index 1f13b8434..fca38d022 100644 --- a/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift +++ b/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift @@ -133,36 +133,25 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol { MXLog.verbose("\(name): Received \(diffs.count) diffs, current room list \(rooms.compactMap { $0.id ?? "Empty" })") - for diff in diffs { - // Special case resets in order to prevent large updates from blocking the UI - // Render the first resetDiffChunkingThreshhold as a reset and then append the rest to give the UI time to update - let resetDiffChunkingThreshhold = 50 - if case .reset(let values) = diff, values.count > resetDiffChunkingThreshhold { - processDiff(RoomListEntriesUpdate.reset(values: Array(values[.. RoomInfo? { class FetchResult {