Room list : debounce subscribe to visible rooms.
This commit is contained in:
parent
2d313089e1
commit
b364cee500
2 changed files with 7 additions and 7 deletions
|
|
@ -53,11 +53,7 @@ internal class RustRoomListService(
|
|||
}
|
||||
|
||||
override suspend fun subscribeToVisibleRooms(roomIds: List<RoomId>) {
|
||||
val toSubscribe = roomIds.filterNot { roomSyncSubscriber.isSubscribedTo(it) }
|
||||
if (toSubscribe.isNotEmpty()) {
|
||||
Timber.d("Subscribe to ${toSubscribe.size} rooms: $toSubscribe")
|
||||
roomSyncSubscriber.batchSubscribe(toSubscribe)
|
||||
}
|
||||
roomSyncSubscriber.batchSubscribe(roomIds)
|
||||
}
|
||||
|
||||
override val allRooms: DynamicRoomList = roomListFactory.createRoomList(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue