Files
orca/mobile/patches/expo-notifications@55.0.27.patch
Jinwoo Hong d33354cfd2 feat(mobile): receive native push notifications from paired desktops (#19951)
* feat(mobile): deliver native push notifications from paired desktops

* fix(mobile): retry push capability probes

* fix(mobile): cancel retired push capability probes

* fix(mobile): ignore stale push reconciliations

* fix(mobile): type capability probe at its boundary

* fix(notifications): route mobile push taps to the originating pane

* Require explicit mobile push-service consent on upgrade
2026-09-11 01:00:16 -04:00

37 lines
1.6 KiB
Diff

diff --git a/build/getDevicePushTokenAsync.js b/build/getDevicePushTokenAsync.js
index f0875c5eaa84d45d646edd1ad5f21a962f68ab02..d93813b2636f1ac5e09081c3207407410a404698 100644
--- a/build/getDevicePushTokenAsync.js
+++ b/build/getDevicePushTokenAsync.js
@@ -20,8 +20,11 @@ export async function getDevicePushTokenAsync() {
else {
// Create a new Promise and clear it afterwards
nativeTokenPromise = PushTokenManager.getDevicePushTokenAsync();
- devicePushToken = await nativeTokenPromise;
- nativeTokenPromise = null;
+ try {
+ devicePushToken = await nativeTokenPromise;
+ } finally {
+ nativeTokenPromise = null;
+ }
}
// @ts-ignore: TS thinks Platform.OS could be anything and can't decide what type is it
return { type: Platform.OS, data: devicePushToken };
diff --git a/src/getDevicePushTokenAsync.ts b/src/getDevicePushTokenAsync.ts
index ab518dff463bc1a92052329ce5ac7c9055cbcf62..ad164f162998b5c1e218f089be82ab474727d68e 100644
--- a/src/getDevicePushTokenAsync.ts
+++ b/src/getDevicePushTokenAsync.ts
@@ -24,8 +24,11 @@ export async function getDevicePushTokenAsync(): Promise<DevicePushToken> {
} else {
// Create a new Promise and clear it afterwards
nativeTokenPromise = PushTokenManager.getDevicePushTokenAsync();
- devicePushToken = await nativeTokenPromise;
- nativeTokenPromise = null;
+ try {
+ devicePushToken = await nativeTokenPromise;
+ } finally {
+ nativeTokenPromise = null;
+ }
}
// @ts-ignore: TS thinks Platform.OS could be anything and can't decide what type is it