Remove room duplicate detection after each diff processing

- room list sorting and handling will be moved to the SDK instead of relying on SS diffs
- we will reintroduce this but on the rust side
This commit is contained in:
Stefan Ceriu 2023-08-25 09:55:38 +03:00 committed by Stefan Ceriu
parent a0a19fa75b
commit 0c2445e01a

View File

@ -153,8 +153,6 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
}
rooms = updatedItems
detectDuplicatesInRoomList(rooms)
MXLog.verbose("\(name): Finished applying \(diffs.count) diffs, new room list \(rooms.compactMap { $0.id ?? "Empty" })")
ServiceLocator.shared.analytics.signpost.endFirstRooms()
@ -315,25 +313,6 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
return CollectionDifference(changes)
}
private func detectDuplicatesInRoomList(_ rooms: [RoomSummary]) {
let filteredRooms = rooms.filter {
switch $0 {
case .empty:
return false
default:
return true
}
}
let groupedRooms = Dictionary(grouping: filteredRooms, by: \.id)
let duplicates = groupedRooms.filter { $1.count > 1 }
if duplicates.count > 0 {
MXLog.error("\(name): Found duplicated room room list items: \(duplicates)")
}
}
}
extension RoomSummaryProviderState {