Updated on 2026-08-14
This commit is contained in:
parent
a64efffd08
commit
c84f5538bd
2 changed files with 6 additions and 4 deletions
|
|
@ -1,13 +1,13 @@
|
||||||
package com.tangem.data.settings.di
|
package com.tangem.data.settings.di
|
||||||
|
|
||||||
import com.tangem.data.settings.DefaultAppRatingRepository
|
import com.tangem.data.settings.DefaultAppRatingRepository
|
||||||
import com.tangem.data.settings.DefaultPromoSettingsRepository
|
|
||||||
import com.tangem.data.settings.DefaultPermissionRepository
|
import com.tangem.data.settings.DefaultPermissionRepository
|
||||||
|
import com.tangem.data.settings.DefaultPromoSettingsRepository
|
||||||
import com.tangem.data.settings.DefaultSettingsRepository
|
import com.tangem.data.settings.DefaultSettingsRepository
|
||||||
import com.tangem.datasource.local.preferences.AppPreferencesStore
|
import com.tangem.datasource.local.preferences.AppPreferencesStore
|
||||||
import com.tangem.domain.settings.repositories.AppRatingRepository
|
import com.tangem.domain.settings.repositories.AppRatingRepository
|
||||||
import com.tangem.domain.settings.repositories.PromoSettingsRepository
|
|
||||||
import com.tangem.domain.settings.repositories.PermissionRepository
|
import com.tangem.domain.settings.repositories.PermissionRepository
|
||||||
|
import com.tangem.domain.settings.repositories.PromoSettingsRepository
|
||||||
import com.tangem.domain.settings.repositories.SettingsRepository
|
import com.tangem.domain.settings.repositories.SettingsRepository
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
import dagger.Provides
|
import dagger.Provides
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ import arrow.core.getOrElse
|
||||||
import com.tangem.core.analytics.api.AnalyticsEventHandler
|
import com.tangem.core.analytics.api.AnalyticsEventHandler
|
||||||
import com.tangem.core.navigation.settings.SettingsManager
|
import com.tangem.core.navigation.settings.SettingsManager
|
||||||
import com.tangem.domain.balancehiding.GetBalanceHidingSettingsUseCase
|
import com.tangem.domain.balancehiding.GetBalanceHidingSettingsUseCase
|
||||||
import com.tangem.domain.tokens.RefreshMultiCurrencyWalletQuotesUseCase
|
|
||||||
import com.tangem.domain.settings.*
|
import com.tangem.domain.settings.*
|
||||||
|
import com.tangem.domain.tokens.RefreshMultiCurrencyWalletQuotesUseCase
|
||||||
import com.tangem.domain.wallets.models.UserWalletId
|
import com.tangem.domain.wallets.models.UserWalletId
|
||||||
import com.tangem.domain.wallets.usecase.GetSelectedWalletUseCase
|
import com.tangem.domain.wallets.usecase.GetSelectedWalletUseCase
|
||||||
import com.tangem.domain.wallets.usecase.GetWalletsUseCase
|
import com.tangem.domain.wallets.usecase.GetWalletsUseCase
|
||||||
|
|
@ -29,6 +29,7 @@ import com.tangem.feature.wallet.presentation.wallet.utils.ScreenLifecycleProvid
|
||||||
import com.tangem.feature.wallet.presentation.wallet.viewmodels.intents.WalletClickIntents
|
import com.tangem.feature.wallet.presentation.wallet.viewmodels.intents.WalletClickIntents
|
||||||
import com.tangem.features.pushnotifications.api.featuretoggles.PushNotificationsFeatureToggles
|
import com.tangem.features.pushnotifications.api.featuretoggles.PushNotificationsFeatureToggles
|
||||||
import com.tangem.features.pushnotifications.api.utils.PUSH_PERMISSION
|
import com.tangem.features.pushnotifications.api.utils.PUSH_PERMISSION
|
||||||
|
import com.tangem.features.pushnotifications.api.utils.getPushPermissionOrNull
|
||||||
import com.tangem.utils.Provider
|
import com.tangem.utils.Provider
|
||||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||||
import com.tangem.utils.coroutines.JobHolder
|
import com.tangem.utils.coroutines.JobHolder
|
||||||
|
|
@ -151,7 +152,8 @@ internal class WalletViewModel @Inject constructor(
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
val isPushToggled = pushNotificationsFeatureToggles.isPushNotificationsEnabled
|
val isPushToggled = pushNotificationsFeatureToggles.isPushNotificationsEnabled
|
||||||
val shouldRequestPush = shouldAskPermissionUseCase(PUSH_PERMISSION)
|
val shouldRequestPush = shouldAskPermissionUseCase(PUSH_PERMISSION)
|
||||||
if (!isPushToggled || !shouldRequestPush) return@launch
|
val isPushPermissionAvailable = getPushPermissionOrNull() != null
|
||||||
|
if (!isPushToggled || !shouldRequestPush || !isPushPermissionAvailable) return@launch
|
||||||
|
|
||||||
delay(timeMillis = 1_800)
|
delay(timeMillis = 1_800)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue