RoomList : rework a bit the api and make usage of entriesWithDynamicAdapters

This commit is contained in:
ganfra 2023-11-22 18:06:19 +01:00
parent 68c4f1e6bc
commit 0fb4eb005c
17 changed files with 317 additions and 213 deletions

View file

@ -45,7 +45,7 @@ class DefaultInviteStateDataSource @Inject constructor(
override fun inviteState(): InvitesState {
val invites by client
.roomListService
.invites()
.invites
.summaries
.collectAsState()

View file

@ -71,7 +71,7 @@ class RoomListDataSource @Inject constructor(
fun launchIn(coroutineScope: CoroutineScope) {
roomListService
.allRooms()
.allRooms
.summaries
.onEach { roomSummaries ->
replaceWith(roomSummaries)
@ -106,7 +106,7 @@ class RoomListDataSource @Inject constructor(
notificationSettingsService.notificationSettingsChangeFlow
.debounce(0.5.seconds)
.onEach {
roomListService.rebuildRoomSummaries()
roomListService.allRooms.rebuildSummaries()
}
.launchIn(appScope)
}