mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-03 23:03:11 +08:00
feat: add restartApp (#488)
This commit is contained in:
@@ -316,6 +316,13 @@ export const UpdateProvider = ({
|
||||
[parseTestPayload],
|
||||
);
|
||||
|
||||
const restartApp = useCallback(
|
||||
async () => {
|
||||
return client.restartApp();
|
||||
},
|
||||
[client],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const parseLinking = (url: string | null) => {
|
||||
if (!url) {
|
||||
@@ -361,6 +368,7 @@ export const UpdateProvider = ({
|
||||
downloadAndInstallApk,
|
||||
getCurrentVersionInfo,
|
||||
parseTestQrCode,
|
||||
restartApp,
|
||||
}}>
|
||||
{children}
|
||||
</UpdateContext.Provider>
|
||||
|
||||
Reference in New Issue
Block a user