Updated on 2026-08-14

This commit is contained in:
Tangem 2024-10-22 15:33:47 +03:00
parent 0d1555d7c6
commit 70af9325c3
4 changed files with 24 additions and 17 deletions

View file

@ -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))
}
}

View file

@ -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()
}
}
}
}

View file

@ -23,9 +23,9 @@
android:id="@+id/tv_body"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="64dp"
android:layout_marginStart="32dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="64dp"
android:layout_marginEnd="32dp"
android:textColor="@color/text_secondary"
android:textAlignment="center"
tools:text="Body"

View file

@ -88,7 +88,7 @@ markdownComposeView = "0.5.4"
# endregion Other libraries
# region Tangem
tangemBlockchainSdk = "release-app_5.17-830"
tangemBlockchainSdk = "release-app_5.17-831"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "release-app_5.17-392"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^