mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
We do not need to observe the user here
This commit is contained in:
parent
abdfd9deee
commit
c542619525
1 changed files with 3 additions and 12 deletions
|
@ -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 ->
|
||||
|
|
Loading…
Reference in a new issue