Updated on 2026-08-14
This commit is contained in:
parent
3993e1d690
commit
bb58d027c6
19 changed files with 200 additions and 19 deletions
|
|
@ -7,4 +7,5 @@ dependencies {
|
|||
implementation(deps.kotlin.coroutines)
|
||||
implementation(deps.arrow.core)
|
||||
implementation(projects.domain.balanceHiding.models)
|
||||
implementation(projects.domain.wallets.models)
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.tangem.domain.settings
|
||||
|
||||
import com.tangem.domain.settings.repositories.PromoSettingsRepository
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
class ShouldShowRingPromoUseCase(private val promoSettingsRepository: PromoSettingsRepository) {
|
||||
|
||||
operator fun invoke(userWalletId: UserWalletId): Flow<Boolean> {
|
||||
return promoSettingsRepository.isReadyToShowRingPromo(userWalletId)
|
||||
}
|
||||
|
||||
suspend fun neverToShow() = promoSettingsRepository.setNeverToShowRingPromo()
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.tangem.domain.settings.repositories
|
||||
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
interface PromoSettingsRepository {
|
||||
|
|
@ -14,4 +15,8 @@ interface PromoSettingsRepository {
|
|||
fun isReadyToShowWalletTravalaPromo(): Flow<Boolean>
|
||||
|
||||
suspend fun setNeverToShowWalletTravalaPromo()
|
||||
|
||||
fun isReadyToShowRingPromo(userWalletId: UserWalletId): Flow<Boolean>
|
||||
|
||||
suspend fun setNeverToShowRingPromo()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue