From c54261952533beccf8a6134eda305f3b05f2eec3 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 25 Apr 2022 18:31:30 +0200 Subject: [PATCH] We do not need to observe the user here --- .../app/features/spaces/SpaceListViewModel.kt | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt index 25bf399c4b..4bf62644c2 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt @@ -40,7 +40,6 @@ import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.flowOn import kotlinx.coroutines.flow.launchIn -import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.sample import kotlinx.coroutines.launch @@ -279,21 +278,13 @@ class SpaceListViewModel @AssistedInject constructor(@Assisted initialState: Spa displayName = QueryStringValue.IsNotEmpty } - val flowSession = session.flow() - combine( - flowSession - .liveUser(session.myUserId) - .map { - it.getOrNull() - }, - flowSession + session.flow() .liveSpaceSummaries(params), - session - .accountDataService() + session.accountDataService() .getLiveRoomAccountDataEvents(setOf(RoomAccountDataTypes.EVENT_TYPE_SPACE_ORDER)) .asFlow() - ) { _, spaces, _ -> + ) { spaces, _ -> spaces } .execute { async ->