1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-23 17:48:55 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

add currentversioninfo

This commit is contained in:
sunnylqm
2025-09-15 23:46:19 +08:00
parent f7be8a4d71
commit bfb520bd07
9 changed files with 47 additions and 23 deletions

View File

@@ -171,27 +171,20 @@ export class UpdateModuleImpl {
}
}
static async setLocalHashInfo(
static setLocalHashInfo(
updateContext: UpdateContext,
hash: string,
info: string
): Promise<boolean> {
if (!this.checkJson(info)) {
await updateContext.setKv(`hash_${hash}`, info);
throw new Error('校验报错:json字符串格式错误');
}
await updateContext.setKv(`hash_${hash}`, info);
): boolean {
updateContext.setKv(`hash_${hash}`, info);
return true;
}
static async getLocalHashInfo(
static getLocalHashInfo(
updateContext: UpdateContext,
hash: string
): Promise<string> {
const value = await updateContext.getKv(`hash_${hash}`);
if (!this.checkJson(value)) {
throw new Error('校验报错:json字符串格式错误');
}
): string {
const value = updateContext.getKv(`hash_${hash}`);
return value;
}
}