Skip to content

Commit

Permalink
Merge branch 'x' into x
Browse files Browse the repository at this point in the history
  • Loading branch information
huhuanming authored Sep 25, 2024
2 parents 46680d3 + 15075a3 commit b4cf9db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/shared/src/utils/notificationsUtils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { StackActions } from '@react-navigation/native';
import { isNil } from 'lodash';

import type { IAppNavigation } from '@onekeyhq/kit/src/hooks/useAppNavigation';
Expand Down Expand Up @@ -113,11 +114,11 @@ async function navigateToNotificationDetail({
params,
});
} else {
// navigate\pushModal\pushFullModal
global.$navigationRef.current?.navigate(
const pushAction = StackActions.push(
modalParams.screen,
modalParams.params,
);
global.$navigationRef.current?.dispatch(pushAction);
}
}
}
Expand Down
14 changes: 14 additions & 0 deletions patches/expo-notifications+0.27.6.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/service/NotificationsService.kt b/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/service/NotificationsService.kt
index 85deee1..4b440da 100644
--- a/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/service/NotificationsService.kt
+++ b/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/service/NotificationsService.kt
@@ -454,7 +454,8 @@ open class NotificationsService : BroadcastReceiver() {
// [notification trampolines](https://developer.android.com/about/versions/12/behavior-changes-12#identify-notification-trampolines)
// are not allowed. If the notification wants to open foreground app,
// we should use the dedicated Activity pendingIntent.
- if (action.opensAppToForeground()) {
+ // https://github.com/expo/expo/pull/30207
+ if (action.opensAppToForeground() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
val notificationResponse = getNotificationResponseFromBroadcastIntent(intent)
return ExpoHandlingDelegate.createPendingIntentForOpeningApp(context, intent, notificationResponse)
}

0 comments on commit b4cf9db

Please sign in to comment.