Add logs to detect duplicates in the room list (#5364)
* Add logs to detect duplicates in the room list * Add comments and helper class about the caching results logging
This commit is contained in:
parent
0b4b63a96b
commit
5c893e7de1
2 changed files with 39 additions and 1 deletions
|
|
@ -33,6 +33,12 @@ class RoomSummaryListProcessor(
|
|||
updates.forEach { update ->
|
||||
applyUpdate(update)
|
||||
}
|
||||
|
||||
// TODO remove once https://github.com/element-hq/element-x-android/issues/5031 has been confirmed as fixed
|
||||
val duplicates = groupingBy { it.roomId }.eachCount().filter { it.value > 1 }
|
||||
if (duplicates.isNotEmpty()) {
|
||||
Timber.e("Found duplicates in room summaries after a list update from the SDK: $duplicates. Updates: $updates")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue