|
@@ -5,20 +5,20 @@ import com.facebook.react.bridge.JavaJSExecutor;
|
5
|
5
|
import com.facebook.react.devsupport.ReactInstanceDevCommandsHandler;
|
6
|
6
|
import com.reactnativenavigation.utils.ReflectionUtils;
|
7
|
7
|
|
8
|
|
-public class JsDevReloadListenerReplacer {
|
|
8
|
+class JsDevReloadListenerReplacer {
|
9
|
9
|
private final ReactInstanceManager reactInstanceManager;
|
10
|
10
|
private final Listener listener;
|
11
|
11
|
|
12
|
|
- public interface Listener {
|
|
12
|
+ interface Listener {
|
13
|
13
|
void onJsDevReload();
|
14
|
14
|
}
|
15
|
15
|
|
16
|
|
- public JsDevReloadListenerReplacer(ReactInstanceManager reactInstanceManager, Listener listener) {
|
|
16
|
+ JsDevReloadListenerReplacer(ReactInstanceManager reactInstanceManager, Listener listener) {
|
17
|
17
|
this.reactInstanceManager = reactInstanceManager;
|
18
|
18
|
this.listener = listener;
|
19
|
19
|
}
|
20
|
20
|
|
21
|
|
- public void replace() {
|
|
21
|
+ void replace() {
|
22
|
22
|
ReactInstanceDevCommandsHandler originalHandler = getOriginalHandler();
|
23
|
23
|
DevCommandsHandlerProxy proxy = new DevCommandsHandlerProxy(originalHandler, listener);
|
24
|
24
|
replaceInReactInstanceManager(proxy);
|
|
@@ -42,7 +42,7 @@ public class JsDevReloadListenerReplacer {
|
42
|
42
|
private ReactInstanceDevCommandsHandler originalReactHandler;
|
43
|
43
|
private final Listener listener;
|
44
|
44
|
|
45
|
|
- public DevCommandsHandlerProxy(ReactInstanceDevCommandsHandler originalReactHandler, Listener listener) {
|
|
45
|
+ DevCommandsHandlerProxy(ReactInstanceDevCommandsHandler originalReactHandler, Listener listener) {
|
46
|
46
|
this.originalReactHandler = originalReactHandler;
|
47
|
47
|
this.listener = listener;
|
48
|
48
|
}
|