mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
Fix space orphan filtering
This commit is contained in:
parent
4ea2b19351
commit
65bb1a7ddc
3 changed files with 5 additions and 4 deletions
1
changelog.d/6272.bugfix
Normal file
1
changelog.d/6272.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix: All rooms are shown in Home regardless of the switch state.
|
|
@ -289,7 +289,7 @@ class HomeDetailViewModel @AssistedInject constructor(
|
|||
.launchIn(viewModelScope)
|
||||
}
|
||||
|
||||
private fun RoomGroupingMethod.BySpace.toActiveSpaceOrOrphanRooms(): SpaceFilter? {
|
||||
return spaceSummary?.roomId?.toActiveSpaceOrOrphanRooms()
|
||||
private fun RoomGroupingMethod.BySpace.toActiveSpaceOrOrphanRooms(): SpaceFilter {
|
||||
return spaceSummary?.roomId.toActiveSpaceOrOrphanRooms()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -371,7 +371,7 @@ class RoomListSectionBuilderSpace(
|
|||
activeSpaceUpdaters.add(object : RoomListViewModel.ActiveSpaceQueryUpdater {
|
||||
override fun updateForSpaceId(roomId: String?) {
|
||||
filteredPagedRoomSummariesLive.queryParams = roomQueryParams.copy(
|
||||
spaceFilter = roomId?.toActiveSpaceOrOrphanRooms()
|
||||
spaceFilter = roomId.toActiveSpaceOrOrphanRooms()
|
||||
)
|
||||
liveQueryParams.update { filteredPagedRoomSummariesLive.queryParams }
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ class RoomListSectionBuilderSpace(
|
|||
return when (spaceFilter) {
|
||||
RoomListViewModel.SpaceFilterStrategy.ORPHANS_IF_SPACE_NULL -> {
|
||||
copy(
|
||||
spaceFilter = currentSpace?.toActiveSpaceOrOrphanRooms()
|
||||
spaceFilter = currentSpace.toActiveSpaceOrOrphanRooms()
|
||||
)
|
||||
}
|
||||
RoomListViewModel.SpaceFilterStrategy.ALL_IF_SPACE_NULL -> {
|
||||
|
|
Loading…
Reference in a new issue