don't leave DMs when leaving all rooms in space

This commit is contained in:
NIkita Fedrunov 2022-04-07 14:22:13 +02:00 committed by Benoit Marty
parent e7a2e654e5
commit 190a425aa6
2 changed files with 3 additions and 0 deletions

1
changelog.d/5609.bugfix Normal file
View file

@ -0,0 +1 @@
Choosing "leave all rooms and spaces" while leaving Space won't cause leaving DMs in this Space anymore

View file

@ -35,6 +35,7 @@ import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import org.matrix.android.sdk.api.query.ActiveSpaceFilter
import org.matrix.android.sdk.api.query.RoomCategoryFilter
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.events.model.EventType
import org.matrix.android.sdk.api.session.room.model.Membership
@ -140,6 +141,7 @@ class SpaceMenuViewModel @AssistedInject constructor(
excludeType = null
activeSpaceFilter = ActiveSpaceFilter.ActiveSpace(initialState.spaceId)
memberships = listOf(Membership.JOIN)
roomCategoryFilter = RoomCategoryFilter.ONLY_ROOMS
}
).forEach {
try {