Updated on 2026-08-14
This commit is contained in:
parent
4305165952
commit
b4aac690c5
2 changed files with 5 additions and 12 deletions
|
|
@ -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