Rename parameter, since it is also invoked in the confirmation dialog, not only for the error dialog.
This commit is contained in:
parent
a1f78372d6
commit
f1f14e9fed
3 changed files with 5 additions and 6 deletions
|
|
@ -86,7 +86,7 @@ fun LogoutView(
|
||||||
onForceLogoutClicked = {
|
onForceLogoutClicked = {
|
||||||
eventSink(LogoutEvents.Logout(ignoreSdkError = true))
|
eventSink(LogoutEvents.Logout(ignoreSdkError = true))
|
||||||
},
|
},
|
||||||
onDismissError = {
|
onDismissDialog = {
|
||||||
eventSink(LogoutEvents.CloseDialogs)
|
eventSink(LogoutEvents.CloseDialogs)
|
||||||
},
|
},
|
||||||
onSuccessLogout = {
|
onSuccessLogout = {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class DefaultDirectLogoutView @Inject constructor() : DirectLogoutView {
|
||||||
onForceLogoutClicked = {
|
onForceLogoutClicked = {
|
||||||
eventSink(DirectLogoutEvents.Logout(ignoreSdkError = true))
|
eventSink(DirectLogoutEvents.Logout(ignoreSdkError = true))
|
||||||
},
|
},
|
||||||
onDismissError = {
|
onDismissDialog = {
|
||||||
eventSink(DirectLogoutEvents.CloseDialogs)
|
eventSink(DirectLogoutEvents.CloseDialogs)
|
||||||
},
|
},
|
||||||
onSuccessLogout = {
|
onSuccessLogout = {
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,7 @@ fun LogoutActionDialog(
|
||||||
state: AsyncAction<String?>,
|
state: AsyncAction<String?>,
|
||||||
onConfirmClicked: () -> Unit,
|
onConfirmClicked: () -> Unit,
|
||||||
onForceLogoutClicked: () -> Unit,
|
onForceLogoutClicked: () -> Unit,
|
||||||
// TODO Rename
|
onDismissDialog: () -> Unit,
|
||||||
onDismissError: () -> Unit,
|
|
||||||
onSuccessLogout: (String?) -> Unit,
|
onSuccessLogout: (String?) -> Unit,
|
||||||
) {
|
) {
|
||||||
when (state) {
|
when (state) {
|
||||||
|
|
@ -42,7 +41,7 @@ fun LogoutActionDialog(
|
||||||
AsyncAction.Confirming ->
|
AsyncAction.Confirming ->
|
||||||
LogoutConfirmationDialog(
|
LogoutConfirmationDialog(
|
||||||
onSubmitClicked = onConfirmClicked,
|
onSubmitClicked = onConfirmClicked,
|
||||||
onDismiss = onDismissError
|
onDismiss = onDismissDialog
|
||||||
)
|
)
|
||||||
is AsyncAction.Loading ->
|
is AsyncAction.Loading ->
|
||||||
ProgressDialog(text = stringResource(id = R.string.screen_signout_in_progress_dialog_content))
|
ProgressDialog(text = stringResource(id = R.string.screen_signout_in_progress_dialog_content))
|
||||||
|
|
@ -52,7 +51,7 @@ fun LogoutActionDialog(
|
||||||
content = stringResource(id = CommonStrings.error_unknown),
|
content = stringResource(id = CommonStrings.error_unknown),
|
||||||
retryText = stringResource(id = CommonStrings.action_signout_anyway),
|
retryText = stringResource(id = CommonStrings.action_signout_anyway),
|
||||||
onRetry = onForceLogoutClicked,
|
onRetry = onForceLogoutClicked,
|
||||||
onDismiss = onDismissError,
|
onDismiss = onDismissDialog,
|
||||||
)
|
)
|
||||||
is AsyncAction.Success -> {
|
is AsyncAction.Success -> {
|
||||||
val latestOnSuccessLogout by rememberUpdatedState(onSuccessLogout)
|
val latestOnSuccessLogout by rememberUpdatedState(onSuccessLogout)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue