Updated on 2026-08-14
This commit is contained in:
parent
0d1555d7c6
commit
70af9325c3
4 changed files with 24 additions and 17 deletions
|
|
@ -660,7 +660,7 @@ private fun handleBackupAction(appState: () -> AppState?, action: BackupAction)
|
|||
// All cardIds may already be activated if the backup was skipped before.
|
||||
if (notActivatedCardIds.isEmpty()) {
|
||||
delay(1000)
|
||||
store.dispatch(BackupAction.BackupFinished(userWallet?.walletId))
|
||||
store.dispatchWithMain(BackupAction.BackupFinished(userWallet?.walletId))
|
||||
return@launch
|
||||
}
|
||||
|
||||
|
|
@ -669,7 +669,7 @@ private fun handleBackupAction(appState: () -> AppState?, action: BackupAction)
|
|||
store.state.globalState.onboardingState.onboardingManager?.finishActivation(notActivatedCardIds)
|
||||
handleFinishBackup(requireNotNull(scanResponse))
|
||||
delay(1000)
|
||||
store.dispatch(BackupAction.BackupFinished(userWalletId = userWallet?.walletId))
|
||||
store.dispatchWithMain(BackupAction.BackupFinished(userWalletId = userWallet?.walletId))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import androidx.compose.foundation.layout.fillMaxSize
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.core.view.MenuProvider
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.transition.TransitionManager
|
||||
import by.kirich1409.viewbindingdelegate.viewBinding
|
||||
|
|
@ -574,22 +575,28 @@ class OnboardingWalletFragment :
|
|||
}
|
||||
|
||||
animator.showSuccess {
|
||||
flCardsContainer.hide()
|
||||
imvCardBackground.hide()
|
||||
showConfetti(true)
|
||||
imvSuccess.alpha = 0f
|
||||
imvSuccess.show()
|
||||
imvSuccess.animate()?.alpha(1f)?.duration = 400
|
||||
if (lifecycle.currentState.isAtLeast(Lifecycle.State.STARTED)) {
|
||||
flCardsContainer.hide()
|
||||
imvCardBackground.hide()
|
||||
showConfetti(true)
|
||||
imvSuccess.alpha = 0f
|
||||
imvSuccess.show()
|
||||
imvSuccess.animate()?.alpha(1f)?.duration = 400
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal fun showConfetti(show: Boolean) = with(binding.vConfetti) {
|
||||
lavConfetti.show(show)
|
||||
internal fun showConfetti(show: Boolean) {
|
||||
if (lifecycle.currentState.isAtLeast(Lifecycle.State.STARTED)) {
|
||||
with(binding.vConfetti) {
|
||||
lavConfetti.show(show)
|
||||
|
||||
if (show) {
|
||||
lavConfetti.playAnimation()
|
||||
} else {
|
||||
lavConfetti.cancelAnimation()
|
||||
if (show) {
|
||||
lavConfetti.playAnimation()
|
||||
} else {
|
||||
lavConfetti.cancelAnimation()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue