1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-18 21:10:40 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
sunnylqm
2024-04-18 22:50:20 +08:00
parent 571c2819b9
commit d1ecfb3f93
3 changed files with 9 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ export class Pushy {
useAlert: true,
strategy: 'both',
logger: noop,
debug: false,
};
lastChecking?: number;
@@ -146,6 +147,12 @@ export class Pushy {
}
};
checkUpdate = async () => {
if (__DEV__ && !this.options.debug) {
console.info(
'您当前处于开发环境且未启用debug不会进行热更检查。如需在开发环境中调试热更请在client中设置debug为true',
);
return;
}
const now = Date.now();
if (
this.lastRespJson &&

View File

@@ -73,4 +73,5 @@ export interface PushyOptions {
strategy?: 'onAppStart' | 'onAppResume' | 'both' | null;
autoMarkSuccess?: boolean;
dismissErrorAfter?: number;
debug?: boolean;
}