mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-28 05:59:05 +03:00
fixing rooms from other spaces being included in home due to wrong filter param
- we were passing null which meant no filter was being applied
This commit is contained in:
parent
050c23b578
commit
1ba8d29333
2 changed files with 3 additions and 3 deletions
|
@ -378,7 +378,7 @@ class RoomListSectionBuilder(
|
|||
activeSpaceUpdaters.add(object : RoomListViewModel.ActiveSpaceQueryUpdater {
|
||||
override fun updateForSpaceId(roomId: String?) {
|
||||
filteredPagedRoomSummariesLive.queryParams = roomQueryParams.copy(
|
||||
spaceFilter = roomId?.toActiveSpaceOrOrphanRooms()
|
||||
spaceFilter = roomId.toActiveSpaceOrOrphanRooms()
|
||||
)
|
||||
liveQueryParams.update { filteredPagedRoomSummariesLive.queryParams }
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ class RoomListSectionBuilder(
|
|||
return when (spaceFilter) {
|
||||
RoomListViewModel.SpaceFilterStrategy.ORPHANS_IF_SPACE_NULL -> {
|
||||
copy(
|
||||
spaceFilter = currentSpace?.toActiveSpaceOrOrphanRooms()
|
||||
spaceFilter = currentSpace.toActiveSpaceOrOrphanRooms()
|
||||
)
|
||||
}
|
||||
RoomListViewModel.SpaceFilterStrategy.ALL_IF_SPACE_NULL -> {
|
||||
|
|
|
@ -124,7 +124,7 @@ class HomeRoomListViewModel @AssistedInject constructor(
|
|||
private fun getSpaceFilter(selectedSpaceId: String?, strategy: RoomListViewModel.SpaceFilterStrategy): SpaceFilter? {
|
||||
return when (strategy) {
|
||||
RoomListViewModel.SpaceFilterStrategy.ORPHANS_IF_SPACE_NULL -> {
|
||||
selectedSpaceId?.toActiveSpaceOrOrphanRooms()
|
||||
selectedSpaceId.toActiveSpaceOrOrphanRooms()
|
||||
}
|
||||
RoomListViewModel.SpaceFilterStrategy.ALL_IF_SPACE_NULL -> {
|
||||
selectedSpaceId?.let { SpaceFilter.ActiveSpace(it) }
|
||||
|
|
Loading…
Reference in a new issue