hybrid-navigation 2.8.2 → 2.8.3

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 2.8.3 (2022-05-05)
2
+
3
+ ### Android
4
+
5
+ - 修复 reload 时,会重复 run application 的问题
6
+
1
7
  ## 2.8.2 (2022-04-27)
2
8
 
3
9
  ### iOS specific
@@ -65,6 +65,23 @@ public class HBDReactRootView extends ReactRootView {
65
65
  super.startReactApplication(reactInstanceManager, moduleName, initialProperties);
66
66
  removeOnGlobalLayoutListener();
67
67
  }
68
+
69
+ // 避免 reload 时,重复 run 的问题
70
+ private boolean shouldRunApplication = true;
71
+
72
+ @Override
73
+ public void runApplication() {
74
+ if (shouldRunApplication) {
75
+ shouldRunApplication = false;
76
+ super.runApplication();
77
+ }
78
+ }
79
+
80
+ @Override
81
+ public void setAppProperties(@Nullable Bundle appProperties) {
82
+ shouldRunApplication = true;
83
+ super.setAppProperties(appProperties);
84
+ }
68
85
 
69
86
  @Override
70
87
  public void unmountReactApplication() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hybrid-navigation",
3
3
  "description": "React Native Navigation that supports seamless navigation between Native and React.",
4
- "version": "2.8.2",
4
+ "version": "2.8.3",
5
5
  "keywords": [
6
6
  "react-native",
7
7
  "navigation",