mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Use AsyncView in EditUserProfileView
This commit is contained in:
committed by
Benoit Marty
parent
6ad2c99576
commit
aaa89afe34
+1
-2
@@ -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) },
|
||||
)
|
||||
|
||||
+1
-2
@@ -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)) }
|
||||
|
||||
Reference in New Issue
Block a user