@dubsdotapp/expo 0.2.67 → 0.2.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/hooks/usePushNotifications.ts +14 -1
package/dist/index.js
CHANGED
|
@@ -2479,6 +2479,16 @@ function usePushNotifications() {
|
|
|
2479
2479
|
(0, import_react16.useEffect)(() => {
|
|
2480
2480
|
if (didMount.current) return;
|
|
2481
2481
|
didMount.current = true;
|
|
2482
|
+
const Notifications = getNotificationsModule();
|
|
2483
|
+
if (Notifications) {
|
|
2484
|
+
Notifications.setNotificationHandler({
|
|
2485
|
+
handleNotification: async () => ({
|
|
2486
|
+
shouldShowAlert: true,
|
|
2487
|
+
shouldPlaySound: true,
|
|
2488
|
+
shouldSetBadge: false
|
|
2489
|
+
})
|
|
2490
|
+
});
|
|
2491
|
+
}
|
|
2482
2492
|
restoreIfGranted();
|
|
2483
2493
|
}, []);
|
|
2484
2494
|
return {
|