Quellcode durchsuchen

finish the splash if reactContext already running

Daniel Zlotin vor 8 Jahren
Ursprung
Commit
d29551906e

+ 6
- 1
android/app/src/main/java/com/reactnativenavigation/controllers/SplashActivity.java Datei anzeigen

@@ -15,7 +15,12 @@ public abstract class SplashActivity extends AppCompatActivity {
15 15
     protected void onCreate(@Nullable Bundle savedInstanceState) {
16 16
         super.onCreate(savedInstanceState);
17 17
         setSplashLayout();
18
-        NavigationApplication.instance.startReactContext();
18
+
19
+        if (NavigationApplication.instance.isReactContextInitialized()) {
20
+            finish();
21
+        } else {
22
+            NavigationApplication.instance.startReactContext();
23
+        }
19 24
     }
20 25
 
21 26
     @Override