Updated on 2026-08-14
This commit is contained in:
parent
2317986222
commit
1bc8d7e86f
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue