react-native-update 10.29.1 → 10.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,8 @@ import static androidx.core.content.FileProvider.getUriForFile;
4
4
  import android.content.Intent;
5
5
  import android.net.Uri;
6
6
  import android.os.Build;
7
+ import android.os.Handler;
8
+ import android.os.Looper;
7
9
  import com.facebook.react.bridge.Promise;
8
10
  import com.facebook.react.bridge.ReactApplicationContext;
9
11
  import com.facebook.react.bridge.ReactContext;
@@ -17,6 +19,7 @@ import java.util.Map;
17
19
  public class UpdateModule extends NativePushySpec {
18
20
  UpdateContext updateContext;
19
21
  public static ReactApplicationContext mContext;
22
+ private final Handler handler = new Handler(Looper.getMainLooper());
20
23
  public UpdateModule(ReactApplicationContext reactContext, UpdateContext updateContext) {
21
24
  super(reactContext);
22
25
  this.updateContext = updateContext;
@@ -38,12 +41,22 @@ public class UpdateModule extends NativePushySpec {
38
41
  boolean isFirstTime = updateContext.isFirstTime();
39
42
  constants.put("isFirstTime", isFirstTime);
40
43
  if (isFirstTime) {
41
- updateContext.clearFirstTime();
44
+ handler.postDelayed(new Runnable() {
45
+ @Override
46
+ public void run() {
47
+ updateContext.clearFirstTime();
48
+ }
49
+ }, 2000);
42
50
  }
43
51
  String rolledBackVersion = updateContext.rolledBackVersion();
44
52
  constants.put("rolledBackVersion", rolledBackVersion);
45
53
  if (rolledBackVersion != null) {
46
- updateContext.clearRollbackMark();
54
+ handler.postDelayed(new Runnable() {
55
+ @Override
56
+ public void run() {
57
+ updateContext.clearRollbackMark();
58
+ }
59
+ }, 2000);
47
60
  }
48
61
  constants.put("uuid", updateContext.getKv("uuid"));
49
62
  return constants;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "10.29.1",
3
+ "version": "10.29.2",
4
4
  "description": "react-native hot update",
5
5
  "main": "src/index",
6
6
  "scripts": {