Room navigation : more reliable roomInfoFlow method
This commit is contained in:
parent
14a638626d
commit
9604acb75a
14 changed files with 75 additions and 74 deletions
|
|
@ -60,7 +60,7 @@ class RoomListDataSource @Inject constructor(
|
|||
fun launchIn(coroutineScope: CoroutineScope) {
|
||||
roomListService
|
||||
.allRooms
|
||||
.summaries
|
||||
.filteredSummaries
|
||||
.onEach { roomSummaries ->
|
||||
replaceWith(roomSummaries)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class RoomListSearchDataSource @Inject constructor(
|
|||
source = RoomList.Source.All,
|
||||
)
|
||||
|
||||
val roomSummaries: Flow<PersistentList<RoomListRoomSummary>> = roomList.summaries
|
||||
val roomSummaries: Flow<PersistentList<RoomListRoomSummary>> = roomList.filteredSummaries
|
||||
.map { roomSummaries ->
|
||||
roomSummaries
|
||||
.filterIsInstance<RoomSummary.Filled>()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue