Updated on 2026-08-14
This commit is contained in:
parent
17d7fb3c02
commit
2934b42af5
29 changed files with 360 additions and 49 deletions
|
|
@ -38,24 +38,19 @@ internal class DefaultPromoRepository(
|
|||
key = PreferencesKeys.getShouldShowPromoKey(promoId = promoId.name),
|
||||
default = true,
|
||||
).map { shouldShow ->
|
||||
if (promoId == PromoId.Referral) {
|
||||
runCatching {
|
||||
when (promoId) {
|
||||
PromoId.Referral -> runCatching {
|
||||
!referralRepository.isReferralParticipant(userWalletId) && shouldShow
|
||||
}.getOrDefault(false)
|
||||
} else {
|
||||
shouldShow
|
||||
PromoId.Sepa -> shouldShow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun isReadyToShowTokenPromo(promoId: PromoId): Flow<Boolean> {
|
||||
return if (promoId == PromoId.Referral) {
|
||||
flowOf(false)
|
||||
} else {
|
||||
appPreferencesStore.get(
|
||||
PreferencesKeys.getShouldShowPromoKey(promoId = promoId.name),
|
||||
default = false,
|
||||
)
|
||||
return when (promoId) {
|
||||
PromoId.Referral -> flowOf(false)
|
||||
PromoId.Sepa -> flowOf(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue