mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 15:50:51 +01:00
Fixes AppStateHandlers in code after merge
This commit is contained in:
parent
590f99a5c2
commit
4f5ad816f1
@ -22,7 +22,7 @@ import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
import im.vector.app.AppStateHandler
|
||||
import im.vector.app.SpaceStateHandler
|
||||
import im.vector.app.core.di.MavericksAssistedViewModelFactory
|
||||
import im.vector.app.core.di.hiltMavericksViewModelFactory
|
||||
import im.vector.app.core.platform.StateView
|
||||
@ -50,7 +50,7 @@ import org.matrix.android.sdk.api.session.room.state.isPublic
|
||||
class HomeRoomListViewModel @AssistedInject constructor(
|
||||
@Assisted initialState: HomeRoomListViewState,
|
||||
private val session: Session,
|
||||
private val appStateHandler: AppStateHandler,
|
||||
private val spaceStateHandler: SpaceStateHandler,
|
||||
private val vectorPreferences: VectorPreferences,
|
||||
) : VectorViewModel<HomeRoomListViewState, HomeRoomListAction, HomeRoomListViewEvents>(initialState) {
|
||||
|
||||
@ -99,10 +99,10 @@ class HomeRoomListViewModel @AssistedInject constructor(
|
||||
pagedListConfig
|
||||
)
|
||||
|
||||
appStateHandler.selectedSpaceFlow
|
||||
spaceStateHandler.getSelectedSpaceFlow()
|
||||
.distinctUntilChanged()
|
||||
.onStart {
|
||||
emit(appStateHandler.getCurrentSpace().toOption())
|
||||
emit(spaceStateHandler.getCurrentSpace().toOption())
|
||||
}
|
||||
.onEach { selectedSpaceOption ->
|
||||
val selectedSpace = selectedSpaceOption.orNull()
|
||||
|
Loading…
Reference in New Issue
Block a user