Commit 51a6d31 1 parent b912f61 commit 51a6d31 Copy full SHA for 51a6d31
File tree 1 file changed +16
-1
lines changed
mattermost-mobile/android/app/src/main/java/com/mattermost/rnbeta
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import android .os .Bundle ;
4
4
import android .support .annotation .Nullable ;
5
+ import com .facebook .react .common .LifecycleState ;
5
6
import com .reactnativenavigation .controllers .SplashActivity ;
7
+ import com .reactnativenavigation .NavigationApplication ;
8
+ import com .reactnativenavigation .react .ReactGateway ;
6
9
7
10
public class MainActivity extends SplashActivity {
8
11
@ Override
@@ -24,8 +27,20 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
24
27
}
25
28
}
26
29
30
+ @ Override
31
+ protected void onResume () {
32
+ ReactGateway reactGateway = NavigationApplication .instance .getReactGateway ();
33
+ if (reactGateway .hasStartedCreatingContext ()
34
+ && reactGateway .getReactInstanceManager ().getLifecycleState () == LifecycleState .BEFORE_CREATE ) {
35
+ System .exit (0 );
36
+ return ;
37
+ }
38
+
39
+ super .onResume ();
40
+ }
41
+
27
42
@ Override
28
43
public int getSplashLayout () {
29
44
return R .layout .launch_screen ;
30
45
}
31
- }
46
+ }
You can’t perform that action at this time.
0 commit comments