Use AsyncView in EditUserProfileView
This commit is contained in:
parent
6ad2c99576
commit
aaa89afe34
7 changed files with 24 additions and 37 deletions
|
|
@ -149,12 +149,11 @@ fun ConfigureRoomView(
|
|||
onActionSelected = { state.eventSink(ConfigureRoomEvents.HandleAvatarAction(it)) }
|
||||
)
|
||||
|
||||
val errorMessage = stringResource(R.string.screen_create_room_error_creating_room)
|
||||
AsyncView(
|
||||
async = state.createRoomAction,
|
||||
progressText = stringResource(CommonStrings.common_creating_room),
|
||||
onSuccess = { onRoomCreated(it) },
|
||||
errorTransform = { errorMessage },
|
||||
errorMessage = { stringResource(R.string.screen_create_room_error_creating_room) },
|
||||
onRetry = { state.eventSink(ConfigureRoomEvents.CreateRoom(state.config)) },
|
||||
onErrorDismiss = { state.eventSink(ConfigureRoomEvents.CancelCreateRoom) },
|
||||
)
|
||||
|
|
|
|||
|
|
@ -93,12 +93,11 @@ fun CreateRoomRootView(
|
|||
}
|
||||
}
|
||||
|
||||
val errorMessage = stringResource(R.string.screen_start_chat_error_starting_chat)
|
||||
AsyncView(
|
||||
async = state.startDmAction,
|
||||
progressText = stringResource(CommonStrings.common_starting_chat),
|
||||
onSuccess = { onOpenDM(it) },
|
||||
errorTransform = { errorMessage },
|
||||
errorMessage = { stringResource(R.string.screen_start_chat_error_starting_chat) },
|
||||
onRetry = {
|
||||
state.userListState.selectedUsers.firstOrNull()
|
||||
?.let { state.eventSink(CreateRoomRootEvents.StartDM(it)) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue