From 34ff27307e212f7aa85dc839fbc9c88a7114952a Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Sun, 24 Apr 2022 13:27:26 +0200 Subject: [PATCH] Update HomeDetailViewModel root spaces logic To recent changes in SpaceListViewModel Change-Id: I4c8a4c07333dd2aeeb5532055913be506c33d59b --- .../im/vector/app/features/home/HomeDetailViewModel.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/HomeDetailViewModel.kt b/vector/src/main/java/im/vector/app/features/home/HomeDetailViewModel.kt index 8f7c236521..0f466af797 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeDetailViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeDetailViewModel.kt @@ -48,7 +48,6 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import org.matrix.android.sdk.api.query.ActiveSpaceFilter -import org.matrix.android.sdk.api.query.QueryStringValue import org.matrix.android.sdk.api.query.RoomCategoryFilter import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.crypto.NewSessionListener @@ -305,11 +304,8 @@ class HomeDetailViewModel @AssistedInject constructor( // Taken from SpaceListViewModel.observeSpaceSummaries() private fun observeRootSpaces() { - val spaceSummaryQueryParams = roomSummaryQueryParams { - memberships = listOf(Membership.JOIN, Membership.INVITE) - displayName = QueryStringValue.IsNotEmpty - excludeType = listOf(/**RoomType.MESSAGING,$*/ - null) + val params = roomSummaryQueryParams { + memberships = listOf(Membership.JOIN) } val flowSession = session.flow() @@ -321,7 +317,7 @@ class HomeDetailViewModel @AssistedInject constructor( it.getOrNull() }, flowSession - .liveSpaceSummaries(spaceSummaryQueryParams), + .liveSpaceSummaries(params), session .accountDataService() .getLiveRoomAccountDataEvents(setOf(RoomAccountDataTypes.EVENT_TYPE_SPACE_ORDER))