Updated on 2026-08-14
This commit is contained in:
parent
4305165952
commit
b4aac690c5
2 changed files with 5 additions and 12 deletions
|
|
@ -109,7 +109,6 @@ class WalletFragment : Fragment(R.layout.fragment_wallet), SafeStoreSubscriber<W
|
|||
val inflater = TransitionInflater.from(requireContext())
|
||||
enterTransition = inflater.inflateTransition(R.transition.slide_right)
|
||||
exitTransition = inflater.inflateTransition(R.transition.fade)
|
||||
learn2earnViewModel.onMainScreenCreated()
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
|
|
|
|||
|
|
@ -55,21 +55,15 @@ class Learn2earnViewModel @Inject constructor(
|
|||
viewModelScope.launch(dispatchers.io) {
|
||||
interactor.getIsTangemWalletFlow()
|
||||
.collect { isTangemWallet ->
|
||||
updateUi {
|
||||
uiState
|
||||
.updateGetBonusVisibility(
|
||||
isVisible = isTangemWallet && interactor.isPromotionActiveOnMain(),
|
||||
)
|
||||
.changeGetBonusDescription(getBonusDescription())
|
||||
if (isTangemWallet) {
|
||||
updateMainScreenViews()
|
||||
} else {
|
||||
updateUi { uiState.updateGetBonusVisibility(isVisible = false) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun onMainScreenCreated() {
|
||||
updateMainScreenViews()
|
||||
}
|
||||
|
||||
fun onMainScreenRefreshed() {
|
||||
updateMainScreenViews()
|
||||
}
|
||||
|
|
@ -103,7 +97,7 @@ class Learn2earnViewModel @Inject constructor(
|
|||
)
|
||||
}
|
||||
.onFailure {
|
||||
Timber.e(it)
|
||||
Timber.w(it)
|
||||
updateUi { uiState.updateGetBonusVisibility(isVisible = false) }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue