@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.mjs
CHANGED
|
@@ -2425,6 +2425,16 @@ function usePushNotifications() {
|
|
|
2425
2425
|
useEffect9(() => {
|
|
2426
2426
|
if (didMount.current) return;
|
|
2427
2427
|
didMount.current = true;
|
|
2428
|
+
const Notifications = getNotificationsModule();
|
|
2429
|
+
if (Notifications) {
|
|
2430
|
+
Notifications.setNotificationHandler({
|
|
2431
|
+
handleNotification: async () => ({
|
|
2432
|
+
shouldShowAlert: true,
|
|
2433
|
+
shouldPlaySound: true,
|
|
2434
|
+
shouldSetBadge: false
|
|
2435
|
+
})
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2428
2438
|
restoreIfGranted();
|
|
2429
2439
|
}, []);
|
|
2430
2440
|
return {
|