-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[expo-notifications][Android] adjust logic in handling responses when app in background or killed #29659
[expo-notifications][Android] adjust logic in handling responses when app in background or killed #29659
Conversation
… app in background or killed
Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines. I've found some issues in your pull request that should be addressed (click on them for more details) 👇
|
The Pull Request introduced fingerprint changes against the base commit: e7f82b4 Fingerprint diff[
{
"type": "dir",
"filePath": "../../packages/expo-notifications/android",
"reasons": [
"expoAutolinkingAndroid"
],
"hash": "d7305631bd216ab148146142fda04f908c3c8f03"
}
] Generated by PR labeler 🤖 |
… app in background or killed (#29659) # Why The logic in `onNotificationResponseFromExtras` needs to be adjusted to correctly check whether response listeners are active, and do that check first before falling back to add the response to the pending responses (eventually used by `useLastNotificationResponse()` in JS). See #28656 (comment) # How Inverted the order of checks in the method. # Test Plan - CI should pass - Test the flows with the test app, using both expo-server-sdk tool and expo.dev/notifications web tool # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
… app in background or killed (#29659) # Why The logic in `onNotificationResponseFromExtras` needs to be adjusted to correctly check whether response listeners are active, and do that check first before falling back to add the response to the pending responses (eventually used by `useLastNotificationResponse()` in JS). See #28656 (comment) # How Inverted the order of checks in the method. # Test Plan - CI should pass - Test the flows with the test app, using both expo-server-sdk tool and expo.dev/notifications web tool # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
… app in background or killed (#29659) The logic in `onNotificationResponseFromExtras` needs to be adjusted to correctly check whether response listeners are active, and do that check first before falling back to add the response to the pending responses (eventually used by `useLastNotificationResponse()` in JS). See #28656 (comment) Inverted the order of checks in the method. - CI should pass - Test the flows with the test app, using both expo-server-sdk tool and expo.dev/notifications web tool <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
Why
The logic in
onNotificationResponseFromExtras
needs to be adjusted to correctly check whether response listeners are active, and do that check first before falling back to add the response to the pending responses (eventually used byuseLastNotificationResponse()
in JS).See #28656 (comment)
How
Inverted the order of checks in the method.
Test Plan
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).