Updated on 2026-08-14

This commit is contained in:
Tangem 2025-04-25 18:57:37 +05:00
parent 2317986222
commit 1bc8d7e86f

View file

@ -3,11 +3,16 @@ package com.tangem.domain.promo
import com.tangem.domain.promo.models.PromoId
import com.tangem.domain.wallets.models.UserWalletId
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.emitAll
import kotlinx.coroutines.flow.flow
class ShouldShowPromoWalletUseCase(private val promoRepository: PromoRepository) {
operator fun invoke(userWalletId: UserWalletId, promoId: PromoId): Flow<Boolean> {
return promoRepository.isReadyToShowWalletPromo(userWalletId, promoId)
return flow {
emit(false)
emitAll(promoRepository.isReadyToShowWalletPromo(userWalletId, promoId))
}
}
suspend fun neverToShow(promoId: PromoId) = promoRepository.setNeverToShowWalletPromo(promoId)