1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-11-02 06:13:11 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

feat: extra param for checkupdate

This commit is contained in:
sunnylqm
2024-07-25 22:04:52 +08:00
parent 54036c0f16
commit a5893d8022
2 changed files with 76 additions and 72 deletions

View File

@@ -150,7 +150,7 @@ export class Pushy {
PushyModule.setNeedUpdate({ hash });
}
};
checkUpdate = async () => {
checkUpdate = async (extra?: Record<string, any>) => {
if (__DEV__ && !this.options.debug) {
console.info(
'您当前处于开发环境且未启用 debug不会进行热更检查。如需在开发环境中调试热更请在 client 中设置 debug 为 true',
@@ -176,6 +176,7 @@ export class Pushy {
hash: currentVersion,
buildTime,
cInfo,
...extra,
};
if (__DEV__) {
delete fetchBody.buildTime;