mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-12-15 17:42:36 +08:00
Update version to 10.36.6 in package.json and simplify version change checks in UpdateContext.java
This commit is contained in:
@@ -46,20 +46,9 @@ public class UpdateContext {
|
|||||||
|
|
||||||
|
|
||||||
SharedPreferences.Editor editor = this.sp.edit();
|
SharedPreferences.Editor editor = this.sp.edit();
|
||||||
if (storedPackageVersion == null) {
|
|
||||||
editor.putString("packageVersion", packageVersion);
|
|
||||||
editor.apply();
|
|
||||||
storedPackageVersion = packageVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (storedBuildTime == null) {
|
|
||||||
editor.putString("buildTime", buildTime);
|
|
||||||
editor.apply();
|
|
||||||
storedBuildTime = buildTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean packageVersionChanged = !packageVersion.equals(storedPackageVersion);
|
boolean packageVersionChanged = storedPackageVersion == null || !packageVersion.equals(storedPackageVersion);
|
||||||
boolean buildTimeChanged = !buildTime.equals(storedBuildTime);
|
boolean buildTimeChanged = storedBuildTime == null || !buildTime.equals(storedBuildTime);
|
||||||
|
|
||||||
if (packageVersionChanged || buildTimeChanged) {
|
if (packageVersionChanged || buildTimeChanged) {
|
||||||
// Execute cleanUp before clearing SharedPreferences to avoid race condition
|
// Execute cleanUp before clearing SharedPreferences to avoid race condition
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update",
|
"name": "react-native-update",
|
||||||
"version": "10.36.5",
|
"version": "10.36.6",
|
||||||
"description": "react-native hot update",
|
"description": "react-native hot update",
|
||||||
"main": "src/index",
|
"main": "src/index",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user