Skip to content

Commit

Permalink
add missing launchActivity to Android (#1833)
Browse files Browse the repository at this point in the history
  • Loading branch information
atn4z7 authored Sep 26, 2024
1 parent dc42fb5 commit d272849
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from 'contexts/DeeplinkContext/types'
import {
LAUNCH_ACTIVITY,
OPEN_CLAIM_REWARDS_PRESS_ACTION_ID,
PressActionId,
STAKE_COMPELETE_DEEPLINK_URL
} from './constants'

Expand Down Expand Up @@ -137,7 +137,7 @@ class NotificationsService {
badgeCount: 1,
channelId: channel.id,
pressAction: {
id: OPEN_CLAIM_REWARDS_PRESS_ACTION_ID,
id: PressActionId.OPEN_CLAIM_REWARDS,
launchActivity: LAUNCH_ACTIVITY
}
}
Expand Down Expand Up @@ -310,7 +310,8 @@ class NotificationsService {
channelId,
// pressAction is needed if you want the notification to open the app when pressed
pressAction: {
id: 'openC-ChainPortfolio'
id: PressActionId.OPEN_PORTFOLIO,
launchActivity: LAUNCH_ACTIVITY
}
},
data
Expand Down
8 changes: 6 additions & 2 deletions packages/core-mobile/app/services/notifications/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
export const STAKE_COMPELETE_DEEPLINK_URL = 'core://stakecomplete'
export const OPEN_CLAIM_REWARDS_PRESS_ACTION_ID =
'open-claim-rewards-press-action-id'

export enum PressActionId {
OPEN_CLAIM_REWARDS = 'open-claim-rewards-press-action-id',
OPEN_PORTFOLIO = 'openC-ChainPortfolio'
}

export const LAUNCH_ACTIVITY = 'com.avaxwallet.MainActivity'

0 comments on commit d272849

Please sign in to comment.