Updated on 2026-08-14
This commit is contained in:
parent
8af068b74b
commit
fc319f2b70
17 changed files with 518 additions and 68 deletions
|
|
@ -894,6 +894,8 @@ internal class WalletModel @Inject constructor(
|
|||
}
|
||||
|
||||
private fun enableNotificationsIfNeeded() {
|
||||
// New first-activation owns auto-enable when the feature is on; skip the legacy path.
|
||||
if (pushNotificationSettingsFeatureToggles.isPushNotificationSettingsEnabled) return
|
||||
modelScope.launch {
|
||||
val isUserAllowToEnableNotifications = notificationsRepository.isUserAllowToSubscribeOnPushNotifications()
|
||||
if (isUserAllowToEnableNotifications) {
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.WalletStateController
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletEvent
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.utils.WalletEventSender
|
||||
import com.tangem.features.pushnotifications.api.analytics.PushNotificationAnalyticEvents
|
||||
import com.tangem.features.pushnotificationsettings.PushNotificationSettingsFeatureToggles
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import kotlinx.coroutines.async
|
||||
|
|
@ -120,6 +121,7 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
private val notificationsRepository: NotificationsRepository,
|
||||
private val setNotificationsEnabledUseCase: SetNotificationsEnabledUseCase,
|
||||
private val getWalletsListForEnablingUseCase: GetWalletsForAutomaticallyPushEnablingUseCase,
|
||||
private val pushNotificationSettingsFeatureToggles: PushNotificationSettingsFeatureToggles,
|
||||
private val uiMessageSender: UiMessageSender,
|
||||
private val reviewManager: ReviewManager,
|
||||
private val closeHotWalletUpgradeBannerUseCase: CloseHotWalletUpgradeBannerUseCase,
|
||||
|
|
@ -373,6 +375,8 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
}
|
||||
|
||||
private suspend fun enableNotificationsIfNeeded() {
|
||||
// New first-activation owns auto-enable when the feature is on; skip the legacy path.
|
||||
if (pushNotificationSettingsFeatureToggles.isPushNotificationSettingsEnabled) return
|
||||
val alreadyEnabledWallets = notificationsRepository.getWalletAutomaticallyEnabledList().map {
|
||||
UserWalletId(it)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue