Updated on 2026-08-14
This commit is contained in:
parent
b2b3114759
commit
9e825e8bcd
2 changed files with 14 additions and 0 deletions
|
|
@ -3,7 +3,9 @@ package com.tangem.tap.features.onboarding.products.wallet.ui.dialogs
|
|||
import android.content.Context
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.tangem.core.analytics.Analytics
|
||||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.features.onboarding.v2.multiwallet.impl.analytics.OnboardingEvent
|
||||
import com.tangem.tap.common.redux.global.GlobalAction
|
||||
import com.tangem.tap.features.onboarding.products.wallet.redux.BackupAction
|
||||
import com.tangem.tap.features.onboarding.products.wallet.redux.BackupDialog
|
||||
|
|
@ -16,10 +18,12 @@ object UnfinishedBackupFoundDialog {
|
|||
setTitle(R.string.common_warning)
|
||||
setMessage(R.string.welcome_interrupted_backup_alert_message)
|
||||
setPositiveButton(R.string.welcome_interrupted_backup_alert_resume) { _, _ ->
|
||||
Analytics.send(OnboardingEvent.Backup.ResumeInterruptedBackup)
|
||||
store.dispatch(GlobalAction.HideDialog)
|
||||
store.dispatch(BackupAction.ResumeFoundUnfinishedBackup(scanResponse))
|
||||
}
|
||||
setNegativeButton(R.string.welcome_interrupted_backup_alert_discard) { _, _ ->
|
||||
Analytics.send(OnboardingEvent.Backup.CancelInterruptedBackup)
|
||||
store.dispatch(GlobalAction.HideDialog)
|
||||
store.dispatch(GlobalAction.ShowDialog(BackupDialog.ConfirmDiscardingBackup(scanResponse)))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,5 +64,15 @@ sealed class OnboardingEvent(
|
|||
event = "Reset Card Notification",
|
||||
params = mapOf("Option" to "Reset"),
|
||||
)
|
||||
|
||||
data object ResumeInterruptedBackup : Backup(
|
||||
event = "Notice - Backup Canceled",
|
||||
params = mapOf("Action" to "Resume"),
|
||||
)
|
||||
|
||||
data object CancelInterruptedBackup : Backup(
|
||||
event = "Notice - Backup Canceled",
|
||||
params = mapOf("Action" to "Cancel"),
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue