Cleaner code

This commit is contained in:
Benoit Marty 2022-05-30 10:43:57 +02:00 committed by Benoit Marty
parent c071dc502e
commit ec498cf054
1 changed files with 3 additions and 9 deletions

View File

@ -441,15 +441,9 @@ class RoomListSectionBuilderSpace(
)
}
RoomListViewModel.SpaceFilterStrategy.ALL_IF_SPACE_NULL -> {
if (currentSpace == null) {
copy(
spaceFilter = null
spaceFilter = currentSpace?.let { SpaceFilter.ActiveSpace(it) }
)
} else {
copy(
spaceFilter = SpaceFilter.ActiveSpace(currentSpace)
)
}
}
RoomListViewModel.SpaceFilterStrategy.NONE -> this
}