Move ViewModel declaration to method param
This commit is contained in:
parent
ae6b6fe1f3
commit
ac87b480e6
1 changed files with 1 additions and 1 deletions
|
|
@ -35,10 +35,10 @@ import io.element.android.x.matrix.core.RoomId
|
|||
|
||||
@Composable
|
||||
fun RoomListScreen(
|
||||
viewModel: RoomListViewModel = mavericksViewModel(),
|
||||
onSuccessLogout: () -> Unit = { },
|
||||
onRoomClicked: (RoomId) -> Unit = { }
|
||||
) {
|
||||
val viewModel: RoomListViewModel = mavericksViewModel()
|
||||
val logoutAction by viewModel.collectAsState(RoomListViewState::logoutAction)
|
||||
val filter by viewModel.collectAsState(RoomListViewState::filter)
|
||||
if (logoutAction is Success) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue