1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-24 01:58:53 +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

@@ -35,7 +35,9 @@ public class UpdateModule extends NativePushySpec {
final Map<String, Object> constants = new HashMap<>();
constants.put("downloadRootDir", updateContext.getRootDir());
constants.put("packageVersion", updateContext.getPackageVersion());
constants.put("currentVersion", updateContext.getCurrentVersion());
String currentVersion = updateContext.getCurrentVersion();
constants.put("currentVersion", currentVersion);
constants.put("currentVersionInfo", updateContext.getKv("hash_" + currentVersion));
constants.put("buildTime", updateContext.getBuildTime());
constants.put("isUsingBundleUrl", updateContext.getIsUsingBundleUrl());
boolean isFirstTime = updateContext.isFirstTime();

View File

@@ -48,7 +48,9 @@ public class UpdateModule extends ReactContextBaseJavaModule {
final Map<String, Object> constants = new HashMap<>();
constants.put("downloadRootDir", updateContext.getRootDir());
constants.put("packageVersion", updateContext.getPackageVersion());
constants.put("currentVersion", updateContext.getCurrentVersion());
String currentVersion = updateContext.getCurrentVersion();
constants.put("currentVersion", currentVersion);
constants.put("currentVersionInfo", updateContext.getKv("hash_" + currentVersion));
constants.put("buildTime", updateContext.getBuildTime());
constants.put("isUsingBundleUrl", updateContext.getIsUsingBundleUrl());
boolean isFirstTime = updateContext.isFirstTime();