Updated on 2026-08-14
This commit is contained in:
parent
2d2d157943
commit
2317986222
2 changed files with 10 additions and 7 deletions
|
|
@ -5,7 +5,6 @@ import android.app.NotificationChannel
|
|||
import android.app.NotificationManager
|
||||
import android.app.PendingIntent
|
||||
import android.content.Intent
|
||||
import android.content.Intent.ACTION_VIEW
|
||||
import android.graphics.Bitmap
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
|
|
@ -18,6 +17,7 @@ import coil.request.ImageRequest
|
|||
import com.google.firebase.messaging.FirebaseMessagingService
|
||||
import com.google.firebase.messaging.RemoteMessage
|
||||
import com.tangem.domain.common.LogConfig
|
||||
import com.tangem.tap.MainActivity
|
||||
import com.tangem.tap.common.images.createCoilImageLoader
|
||||
import com.tangem.tap.features.intentHandler.handlers.OnPushClickedIntentHandler
|
||||
import com.tangem.wallet.R
|
||||
|
|
@ -37,7 +37,7 @@ internal class TangemPushNotificationService : FirebaseMessagingService() {
|
|||
val notification = message.notification ?: return
|
||||
val channelId = notification.channelId ?: TANGEM_CHANNEL_ID
|
||||
|
||||
val intent = Intent(ACTION_VIEW).apply {
|
||||
val intent = Intent(applicationContext, MainActivity::class.java).apply {
|
||||
data = message.data[DEEPLINK_KEY]?.toUri()
|
||||
putExtra(OnPushClickedIntentHandler.OPENED_FROM_GCM_PUSH, true)
|
||||
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.tangem.core.deeplink.DeepLinksRegistry
|
|||
import com.tangem.core.deeplink.global.BuyCurrencyDeepLink
|
||||
import com.tangem.core.deeplink.global.ReferralDeepLink
|
||||
import com.tangem.core.deeplink.global.SellCurrencyDeepLink
|
||||
import com.tangem.domain.common.util.cardTypesResolver
|
||||
import com.tangem.domain.tokens.GetCryptoCurrencyUseCase
|
||||
import com.tangem.domain.tokens.model.analytics.TokenScreenAnalyticsEvent
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
|
|
@ -55,7 +56,7 @@ internal class WalletDeepLinksHandler @Inject constructor(
|
|||
)
|
||||
|
||||
return buildList {
|
||||
addReferralDeepLink(userWallet.walletId)
|
||||
addReferralDeepLink(userWallet)
|
||||
add(sellCurrencyDeepLink)
|
||||
if (onrampFeatureToggles.isFeatureEnabled || !userWallet.isMultiCurrency) {
|
||||
add(
|
||||
|
|
@ -98,13 +99,15 @@ internal class WalletDeepLinksHandler @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun MutableList<DeepLink>.addReferralDeepLink(userWalletId: UserWalletId) {
|
||||
private fun MutableList<DeepLink>.addReferralDeepLink(userWallet: UserWallet) {
|
||||
add(
|
||||
ReferralDeepLink(
|
||||
onReceive = {
|
||||
router.push(
|
||||
AppRoute.ReferralProgram(userWalletId = userWalletId),
|
||||
)
|
||||
if (userWallet.cardTypesResolver.isTangemWallet()) {
|
||||
router.push(
|
||||
AppRoute.ReferralProgram(userWalletId = userWallet.walletId),
|
||||
)
|
||||
}
|
||||
},
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue