Updated on 2026-08-14

This commit is contained in:
Tangem 2022-07-24 22:13:09 +03:00
parent 2f8cdb311e
commit 238af24a36
2 changed files with 7 additions and 7 deletions

View file

@ -39,7 +39,7 @@ class HomeFragment : Fragment(R.layout.fragment_home), StoreSubscriber<HomeState
StoriesScreen(
homeState,
onScanButtonClick = {
store.dispatch(HomeAction.ChangeScanCardButtonState(IndeterminateProgressButton(ButtonState.PROGRESS)))
// store.dispatch(HomeAction.ChangeScanCardButtonState(IndeterminateProgressButton(ButtonState.PROGRESS)))
// newState(HomeState(
// store.state.homeState.shouldScanCardOnResume,
// IndeterminateProgressButton(ButtonState.PROGRESS)

View file

@ -55,8 +55,8 @@ fun StoriesScreen(
val isPressed = remember { mutableStateOf(false) }
val needsToBePaused =
remember(homeState) { mutableStateOf(homeState.value.btnScanState.progressState == ProgressState.Loading) }
val isPaused = isPressed.value || needsToBePaused.value
remember(homeState) { mutableStateOf(homeState) }
val isPaused = isPressed.value || needsToBePaused.value.value.btnScanState.progressState == ProgressState.Loading
val hideContent = remember { mutableStateOf(true) }
@ -139,11 +139,11 @@ fun StoriesScreen(
colorFilter = if (isDarkBackground) null else ColorFilter.tint(Color.Black)
)
when (currentStep.value) {
1 -> FirstStoriesContent(needsToBePaused.value, currentStep.duration()) { hideContent.value = it }
1 -> FirstStoriesContent(needsToBePaused.value.value.btnScanState.progressState == ProgressState.Loading, currentStep.duration()) { hideContent.value = it }
2 -> StoriesRevolutionaryWallet(currentStep.duration())
3 -> StoriesUltraSecureBackup(needsToBePaused.value, currentStep.duration())
4 -> StoriesCurrencies(needsToBePaused.value, currentStep.duration())
5 -> StoriesWeb3(needsToBePaused.value, currentStep.duration())
3 -> StoriesUltraSecureBackup(needsToBePaused.value.value.btnScanState.progressState == ProgressState.Loading, currentStep.duration())
4 -> StoriesCurrencies(needsToBePaused.value.value.btnScanState.progressState == ProgressState.Loading, currentStep.duration())
5 -> StoriesWeb3(needsToBePaused.value.value.btnScanState.progressState == ProgressState.Loading, currentStep.duration())
6 -> StoriesWalletForEveryone(currentStep.duration())
}
}