Browse Source

temp comment explaining this mess

Daniel Zlotin 7 years ago
parent
commit
1514743224

+ 1
- 2
android/app/src/main/java/com/reactnativenavigation/NavigationApplication.java View File

81
                             UiThread.postDelayed(new Runnable() {
81
                             UiThread.postDelayed(new Runnable() {
82
                                 @Override
82
                                 @Override
83
                                 public void run() {
83
                                 public void run() {
84
-                                    android.util.Log.d("DebuggingIsHell", "NavigationApplication:run() " + 1);
85
                                     new NavigationEventEmitter(context).emitAppLaunched();
84
                                     new NavigationEventEmitter(context).emitAppLaunched();
86
                                 }
85
                                 }
87
                             }, diff);
86
                             }, diff);
95
                 host.getReactInstanceManager().onHostResume(activity, (DefaultHardwareBackBtnHandler) activity);
94
                 host.getReactInstanceManager().onHostResume(activity, (DefaultHardwareBackBtnHandler) activity);
96
 
95
 
97
                 if (creating.compareAndSet(true, false)) {
96
                 if (creating.compareAndSet(true, false)) {
97
+                    // this should run only after activity closed and started again, but we already HAVE context
98
                     UiThread.postDelayed(new Runnable() {
98
                     UiThread.postDelayed(new Runnable() {
99
                         @Override
99
                         @Override
100
                         public void run() {
100
                         public void run() {
101
-                            android.util.Log.d("DebuggingIsHell", "NavigationApplication:run() " + 2);
102
                             new NavigationEventEmitter(host.getReactInstanceManager().getCurrentReactContext()).emitAppLaunched();
101
                             new NavigationEventEmitter(host.getReactInstanceManager().getCurrentReactContext()).emitAppLaunched();
103
                         }
102
                         }
104
                     }, 1000);
103
                     }, 1000);