react-native-update 10.25.0 → 10.25.2
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/package.json +1 -1
- package/src/provider.tsx +9 -4
package/package.json
CHANGED
package/src/provider.tsx
CHANGED
|
@@ -325,11 +325,16 @@ export const UpdateProvider = ({
|
|
|
325
325
|
};
|
|
326
326
|
|
|
327
327
|
Linking.getInitialURL().then(parseLinking);
|
|
328
|
-
const
|
|
329
|
-
parseLinking(url)
|
|
330
|
-
|
|
328
|
+
const linkingHandler = ({ url }: { url: string }) => {
|
|
329
|
+
parseLinking(url);
|
|
330
|
+
};
|
|
331
|
+
const linkingListener = Linking.addEventListener('url', linkingHandler);
|
|
331
332
|
return () => {
|
|
332
|
-
|
|
333
|
+
if ('removeEventListener' in Linking) {
|
|
334
|
+
(Linking as any).removeEventListener('url', linkingHandler);
|
|
335
|
+
} else {
|
|
336
|
+
linkingListener.remove();
|
|
337
|
+
}
|
|
333
338
|
};
|
|
334
339
|
}, [parseTestPayload]);
|
|
335
340
|
|