Rename handleEvents to handleEvent
This commit is contained in:
@@ -36,7 +36,7 @@ class SecureBackupDisablePresenter(
|
||||
Timber.tag(loggerTagDisable.value).d("backupState: $backupState")
|
||||
val disableAction: MutableState<AsyncAction<Unit>> = remember { mutableStateOf(AsyncAction.Uninitialized) }
|
||||
val coroutineScope = rememberCoroutineScope()
|
||||
fun handleEvents(event: SecureBackupDisableEvents) {
|
||||
fun handleEvent(event: SecureBackupDisableEvents) {
|
||||
when (event) {
|
||||
is SecureBackupDisableEvents.DisableBackup -> coroutineScope.disableBackup(disableAction)
|
||||
SecureBackupDisableEvents.DismissDialogs -> {
|
||||
@@ -49,7 +49,7 @@ class SecureBackupDisablePresenter(
|
||||
backupState = backupState,
|
||||
disableAction = disableAction.value,
|
||||
appName = buildMeta.applicationName,
|
||||
eventSink = ::handleEvents
|
||||
eventSink = ::handleEvent,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class SecureBackupEnterRecoveryKeyPresenter(
|
||||
mutableStateOf(AsyncAction.Uninitialized)
|
||||
}
|
||||
|
||||
fun handleEvents(event: SecureBackupEnterRecoveryKeyEvents) {
|
||||
fun handleEvent(event: SecureBackupEnterRecoveryKeyEvents) {
|
||||
when (event) {
|
||||
SecureBackupEnterRecoveryKeyEvents.ClearDialog -> {
|
||||
submitAction.value = AsyncAction.Uninitialized
|
||||
@@ -78,7 +78,7 @@ class SecureBackupEnterRecoveryKeyPresenter(
|
||||
),
|
||||
isSubmitEnabled = recoveryKey.isNotEmpty() && submitAction.value.isUninitialized(),
|
||||
submitAction = submitAction.value,
|
||||
eventSink = ::handleEvents
|
||||
eventSink = ::handleEvent,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class ResetIdentityPasswordPresenter(
|
||||
|
||||
return ResetIdentityPasswordState(
|
||||
resetAction = resetAction.value,
|
||||
eventSink = ::handleEvent
|
||||
eventSink = ::handleEvent,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class ResetIdentityRootPresenter : Presenter<ResetIdentityRootState> {
|
||||
|
||||
return ResetIdentityRootState(
|
||||
displayConfirmationDialog = displayConfirmDialog,
|
||||
eventSink = ::handleEvent
|
||||
eventSink = ::handleEvent,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class SecureBackupRootPresenter(
|
||||
}
|
||||
}
|
||||
|
||||
fun handleEvents(event: SecureBackupRootEvents) {
|
||||
fun handleEvent(event: SecureBackupRootEvents) {
|
||||
when (event) {
|
||||
SecureBackupRootEvents.RetryKeyBackupState -> localCoroutineScope.getKeyBackupStatus(doesBackupExistOnServerAction)
|
||||
SecureBackupRootEvents.EnableKeyStorage -> localCoroutineScope.enableBackup(enableAction)
|
||||
@@ -78,7 +78,7 @@ class SecureBackupRootPresenter(
|
||||
appName = buildMeta.applicationName,
|
||||
displayKeyStorageDisabledError = displayKeyStorageDisabledError,
|
||||
snackbarMessage = snackbarMessage,
|
||||
eventSink = ::handleEvents,
|
||||
eventSink = ::handleEvent,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class SecureBackupSetupPresenter(
|
||||
}
|
||||
var showSaveConfirmationDialog by remember { mutableStateOf(false) }
|
||||
|
||||
fun handleEvents(event: SecureBackupSetupEvents) {
|
||||
fun handleEvent(event: SecureBackupSetupEvents) {
|
||||
when (event) {
|
||||
SecureBackupSetupEvents.CreateRecoveryKey -> {
|
||||
coroutineScope.createOrChangeRecoveryKey(stateAndDispatch)
|
||||
@@ -81,7 +81,7 @@ class SecureBackupSetupPresenter(
|
||||
recoveryKeyViewState = recoveryKeyViewState,
|
||||
setupState = setupState,
|
||||
showSaveConfirmationDialog = showSaveConfirmationDialog,
|
||||
eventSink = ::handleEvents
|
||||
eventSink = ::handleEvent,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user