We do not need to observe the user here
This commit is contained in:
parent
abdfd9deee
commit
c542619525
|
@ -40,7 +40,6 @@ import kotlinx.coroutines.flow.combine
|
||||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||||
import kotlinx.coroutines.flow.flowOn
|
import kotlinx.coroutines.flow.flowOn
|
||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
import kotlinx.coroutines.flow.map
|
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
import kotlinx.coroutines.flow.sample
|
import kotlinx.coroutines.flow.sample
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
@ -279,21 +278,13 @@ class SpaceListViewModel @AssistedInject constructor(@Assisted initialState: Spa
|
||||||
displayName = QueryStringValue.IsNotEmpty
|
displayName = QueryStringValue.IsNotEmpty
|
||||||
}
|
}
|
||||||
|
|
||||||
val flowSession = session.flow()
|
|
||||||
|
|
||||||
combine(
|
combine(
|
||||||
flowSession
|
session.flow()
|
||||||
.liveUser(session.myUserId)
|
|
||||||
.map {
|
|
||||||
it.getOrNull()
|
|
||||||
},
|
|
||||||
flowSession
|
|
||||||
.liveSpaceSummaries(params),
|
.liveSpaceSummaries(params),
|
||||||
session
|
session.accountDataService()
|
||||||
.accountDataService()
|
|
||||||
.getLiveRoomAccountDataEvents(setOf(RoomAccountDataTypes.EVENT_TYPE_SPACE_ORDER))
|
.getLiveRoomAccountDataEvents(setOf(RoomAccountDataTypes.EVENT_TYPE_SPACE_ORDER))
|
||||||
.asFlow()
|
.asFlow()
|
||||||
) { _, spaces, _ ->
|
) { spaces, _ ->
|
||||||
spaces
|
spaces
|
||||||
}
|
}
|
||||||
.execute { async ->
|
.execute { async ->
|
||||||
|
|
Loading…
Reference in New Issue