Let AsyncAction.Confirming be an interface, with a AsyncAction.ConfirmingNoParams data object.
This will allow inheritance of `AsyncAction.Confirming` with parameter(s).
This commit is contained in:
parent
c46896be09
commit
97fb7bc2fa
46 changed files with 86 additions and 84 deletions
|
|
@ -51,7 +51,7 @@ class AccountDeactivationPresenter @Inject constructor(
|
|||
action
|
||||
)
|
||||
} else {
|
||||
action.value = AsyncAction.Confirming
|
||||
action.value = AsyncAction.ConfirmingNoParams
|
||||
}
|
||||
AccountDeactivationEvents.CloseDialogs -> {
|
||||
action.value = AsyncAction.Uninitialized
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ open class AccountDeactivationStateProvider : PreviewParameterProvider<AccountDe
|
|||
),
|
||||
anAccountDeactivationState(
|
||||
deactivateFormState = filledForm,
|
||||
accountDeactivationAction = AsyncAction.Confirming,
|
||||
accountDeactivationAction = AsyncAction.ConfirmingNoParams,
|
||||
),
|
||||
anAccountDeactivationState(
|
||||
deactivateFormState = filledForm,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ fun AccountDeactivationActionDialog(
|
|||
when (state) {
|
||||
AsyncAction.Uninitialized ->
|
||||
Unit
|
||||
AsyncAction.Confirming ->
|
||||
is AsyncAction.Confirming ->
|
||||
AccountDeactivationConfirmationDialog(
|
||||
onSubmitClick = onConfirmClick,
|
||||
onDismiss = onDismissDialog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue