Fix switching space use case
This commit is contained in:
parent
b72c357dd1
commit
c79aa267c3
|
@ -399,13 +399,15 @@ class RoomListSectionBuilderSpace(
|
||||||
.flowOn(Dispatchers.Default)
|
.flowOn(Dispatchers.Default)
|
||||||
.launchIn(viewModelScope)
|
.launchIn(viewModelScope)
|
||||||
|
|
||||||
|
val itemCountFlow = livePagedList.asFlow()
|
||||||
|
.flatMapLatest { session.getRoomCountFlow(roomQueryParams.process(spaceFilterStrategy, appStateHandler.safeActiveSpaceId())) }
|
||||||
|
|
||||||
sections.add(
|
sections.add(
|
||||||
RoomsSection(
|
RoomsSection(
|
||||||
sectionName = name,
|
sectionName = name,
|
||||||
livePages = livePagedList,
|
livePages = livePagedList,
|
||||||
notifyOfLocalEcho = notifyOfLocalEcho,
|
notifyOfLocalEcho = notifyOfLocalEcho,
|
||||||
// TODO not working when switching spaces, how does the query is updated in this case?
|
itemCount = itemCountFlow
|
||||||
itemCount = session.getRoomCountFlow(roomQueryParams.process(spaceFilterStrategy, appStateHandler.safeActiveSpaceId()))
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue