Browse Source

handling incorrect starts of splashActivity

Daniel Zlotin 8 years ago
parent
commit
bb3b494bea

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java View File

74
     @Override
74
     @Override
75
     protected void onResume() {
75
     protected void onResume() {
76
         super.onResume();
76
         super.onResume();
77
-        if (isFinishing()) {
77
+        if (isFinishing() || !NavigationApplication.instance.isReactContextInitialized()) {
78
             return;
78
             return;
79
         }
79
         }
80
 
80
 

+ 6
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/SplashActivity.java View File

17
         super.onCreate(savedInstanceState);
17
         super.onCreate(savedInstanceState);
18
         setSplashLayout();
18
         setSplashLayout();
19
 
19
 
20
+        if (NavigationApplication.instance.isReactContextInitialized()) {
21
+            finish();
22
+            return;
23
+        }
24
+
20
         if (ReactDevPermission.shouldAskPermission()) {
25
         if (ReactDevPermission.shouldAskPermission()) {
21
             ReactDevPermission.askPermission(this);
26
             ReactDevPermission.askPermission(this);
27
+            finish();
22
             return;
28
             return;
23
         }
29
         }
24
 
30