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
|
@ -378,7 +378,7 @@ class RoomListSectionBuilder(
|
||||||
activeSpaceUpdaters.add(object : RoomListViewModel.ActiveSpaceQueryUpdater {
|
activeSpaceUpdaters.add(object : RoomListViewModel.ActiveSpaceQueryUpdater {
|
||||||
override fun updateForSpaceId(roomId: String?) {
|
override fun updateForSpaceId(roomId: String?) {
|
||||||
filteredPagedRoomSummariesLive.queryParams = roomQueryParams.copy(
|
filteredPagedRoomSummariesLive.queryParams = roomQueryParams.copy(
|
||||||
spaceFilter = roomId?.toActiveSpaceOrOrphanRooms()
|
spaceFilter = roomId.toActiveSpaceOrOrphanRooms()
|
||||||
)
|
)
|
||||||
liveQueryParams.update { filteredPagedRoomSummariesLive.queryParams }
|
liveQueryParams.update { filteredPagedRoomSummariesLive.queryParams }
|
||||||
}
|
}
|
||||||
|
@ -444,7 +444,7 @@ class RoomListSectionBuilder(
|
||||||
return when (spaceFilter) {
|
return when (spaceFilter) {
|
||||||
RoomListViewModel.SpaceFilterStrategy.ORPHANS_IF_SPACE_NULL -> {
|
RoomListViewModel.SpaceFilterStrategy.ORPHANS_IF_SPACE_NULL -> {
|
||||||
copy(
|
copy(
|
||||||
spaceFilter = currentSpace?.toActiveSpaceOrOrphanRooms()
|
spaceFilter = currentSpace.toActiveSpaceOrOrphanRooms()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
RoomListViewModel.SpaceFilterStrategy.ALL_IF_SPACE_NULL -> {
|
RoomListViewModel.SpaceFilterStrategy.ALL_IF_SPACE_NULL -> {
|
||||||
|
|
|
@ -124,7 +124,7 @@ class HomeRoomListViewModel @AssistedInject constructor(
|
||||||
private fun getSpaceFilter(selectedSpaceId: String?, strategy: RoomListViewModel.SpaceFilterStrategy): SpaceFilter? {
|
private fun getSpaceFilter(selectedSpaceId: String?, strategy: RoomListViewModel.SpaceFilterStrategy): SpaceFilter? {
|
||||||
return when (strategy) {
|
return when (strategy) {
|
||||||
RoomListViewModel.SpaceFilterStrategy.ORPHANS_IF_SPACE_NULL -> {
|
RoomListViewModel.SpaceFilterStrategy.ORPHANS_IF_SPACE_NULL -> {
|
||||||
selectedSpaceId?.toActiveSpaceOrOrphanRooms()
|
selectedSpaceId.toActiveSpaceOrOrphanRooms()
|
||||||
}
|
}
|
||||||
RoomListViewModel.SpaceFilterStrategy.ALL_IF_SPACE_NULL -> {
|
RoomListViewModel.SpaceFilterStrategy.ALL_IF_SPACE_NULL -> {
|
||||||
selectedSpaceId?.let { SpaceFilter.ActiveSpace(it) }
|
selectedSpaceId?.let { SpaceFilter.ActiveSpace(it) }
|
||||||
|
|
Loading…
Reference in New Issue