code review
This commit is contained in:
parent
8e6e6736a3
commit
4f5632b916
@ -166,19 +166,18 @@ class MatrixToBottomSheetViewModel @AssistedInject constructor(
|
||||
enableEncryptionIfInvitedUsersSupportIt = adminE2EByDefault
|
||||
}
|
||||
|
||||
val roomId =
|
||||
try {
|
||||
awaitCallback<String> { session.createRoom(roomParams, it) }.also {
|
||||
setState {
|
||||
copy(startChattingState = Success(Unit))
|
||||
}
|
||||
}
|
||||
val roomId = try {
|
||||
awaitCallback<String> { session.createRoom(roomParams, it) }
|
||||
} catch (failure: Throwable) {
|
||||
setState {
|
||||
copy(startChattingState = Fail(Exception(stringProvider.getString(R.string.invite_users_to_room_failure))))
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
setState {
|
||||
// we can hide this button has we will navigate out
|
||||
copy(startChattingState = Uninitialized)
|
||||
}
|
||||
_viewEvents.post(MatrixToViewEvents.NavigateToRoom(roomId))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user