mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-16 08:41:37 +08:00
checkUpdate now returns info
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-update",
|
||||
"version": "10.25.4",
|
||||
"version": "10.26.0",
|
||||
"description": "react-native hot update",
|
||||
"main": "src/index",
|
||||
"scripts": {
|
||||
|
@@ -20,7 +20,7 @@ export const defaultContext = {
|
||||
};
|
||||
|
||||
export const UpdateContext = createContext<{
|
||||
checkUpdate: () => Promise<void>;
|
||||
checkUpdate: () => Promise<void | CheckResult>;
|
||||
switchVersion: () => Promise<void>;
|
||||
switchVersionLater: () => Promise<void>;
|
||||
markSuccess: () => void;
|
||||
|
@@ -188,7 +188,7 @@ export const UpdateProvider = ({
|
||||
} else {
|
||||
Linking.openURL(downloadUrl);
|
||||
}
|
||||
return;
|
||||
return info;
|
||||
}
|
||||
alertUpdate('提示', '您的应用版本已更新,点击更新下载安装新版本', [
|
||||
{
|
||||
@@ -209,7 +209,7 @@ export const UpdateProvider = ({
|
||||
options.updateStrategy === 'silentAndLater'
|
||||
) {
|
||||
downloadUpdate(info);
|
||||
return;
|
||||
return info;
|
||||
}
|
||||
alertUpdate(
|
||||
'提示',
|
||||
@@ -226,6 +226,7 @@ export const UpdateProvider = ({
|
||||
],
|
||||
);
|
||||
}
|
||||
return info;
|
||||
},
|
||||
[
|
||||
client,
|
||||
|
Reference in New Issue
Block a user