Use AsyncView in EditUserProfileView

This commit is contained in:
Benoit Marty 2023-11-03 16:35:34 +01:00 committed by Benoit Marty
parent 6ad2c99576
commit aaa89afe34
7 changed files with 24 additions and 37 deletions

View file

@ -63,12 +63,11 @@ fun ReportMessageView(
) {
val focusManager = LocalFocusManager.current
val isSending = state.result is Async.Loading
val errorMessage = stringResource(CommonStrings.error_unknown)
AsyncView(
async = state.result,
showProgressDialog = false,
onSuccess = { onBackClicked() },
errorTransform = { errorMessage },
errorMessage = { stringResource(CommonStrings.error_unknown) },
onErrorDismiss = { state.eventSink(ReportMessageEvents.ClearError) }
)