Browse Source

fixed android getLaunchArgs

Daniel Zlotin 6 years ago
parent
commit
0f2ade7f77

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

549
 
549
 
550
     public static void getLaunchArgs(Promise promise) {
550
     public static void getLaunchArgs(Promise promise) {
551
         Bundle bundle = LaunchArgs.instance.get();
551
         Bundle bundle = LaunchArgs.instance.get();
552
-        promise.resolve(bundle);
552
+        promise.resolve(Arguments.fromBundle(bundle));
553
     }
553
     }
554
 }
554
 }

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/react/LaunchArgs.java View File

10
     private Bundle launchArgs;
10
     private Bundle launchArgs;
11
 
11
 
12
     public void set(Intent intent) {
12
     public void set(Intent intent) {
13
-        if (intent != null && intent.getExtras() != null && launchArgs != null) {
13
+        if (intent != null && intent.getExtras() != null && launchArgs == null) {
14
             this.launchArgs = intent.getExtras();
14
             this.launchArgs = intent.getExtras();
15
         }
15
         }
16
     }
16
     }