Updated on 2026-08-14
This commit is contained in:
parent
894958995e
commit
608fc06cf1
2 changed files with 5 additions and 1 deletions
|
|
@ -51,6 +51,7 @@ internal class MainViewModel @Inject constructor(
|
|||
}
|
||||
.onEach {
|
||||
if (state.value.modalNotification?.isShow != true) {
|
||||
listenToFlipsUseCase.isEnabled = false
|
||||
stateHolder.updateWithHiddenBalancesNotification()
|
||||
reduxNavController.navigate(NavigationAction.NavigateTo(AppScreen.ModalNotification))
|
||||
}
|
||||
|
|
@ -123,6 +124,7 @@ internal class MainViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
override fun onDismissBottomSheet() {
|
||||
listenToFlipsUseCase.isEnabled = true
|
||||
stateHolder.updateWithoutModalNotification()
|
||||
stateHolder.updateWithHiddenBalancesToast(true)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ class ListenToFlipsUseCase(
|
|||
private val balanceHidingRepository: BalanceHidingRepository,
|
||||
) {
|
||||
|
||||
var isEnabled: Boolean = true
|
||||
|
||||
operator fun invoke(): Flow<Either<HideBalancesError, Unit>> = channelFlow {
|
||||
flipDetector.getDeviceFlipFlow().collectLatest {
|
||||
val balanceHidingSettings = catch(
|
||||
|
|
@ -24,7 +26,7 @@ class ListenToFlipsUseCase(
|
|||
},
|
||||
)
|
||||
|
||||
if (balanceHidingSettings.isHidingEnabledInSettings) {
|
||||
if (balanceHidingSettings.isHidingEnabledInSettings && isEnabled) {
|
||||
catch(
|
||||
block = {
|
||||
balanceHidingRepository.storeBalanceHidingSettings(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue