浏览代码

Finish SplahActivity if react context exists

Fixes #1938 Closes #1900
Guy Carmeli 7 年前
父节点
当前提交
5c266e4436
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      android/app/src/main/java/com/reactnativenavigation/controllers/SplashActivity.java

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/SplashActivity.java 查看文件

@@ -27,6 +27,10 @@ public abstract class SplashActivity extends AppCompatActivity {
27 27
 
28 28
         if (NavigationApplication.instance.getReactGateway().hasStartedCreatingContext()) {
29 29
             NavigationApplication.instance.getEventEmitter().sendAppLaunchedEvent();
30
+            if (NavigationApplication.instance.clearHostOnActivityDestroy()) {
31
+                overridePendingTransition(0, 0);
32
+                finish();
33
+            }
30 34
             return;
31 35
         }
32 36