|
@@ -26,21 +26,20 @@ public class NavigationEvent {
|
26
|
26
|
}
|
27
|
27
|
|
28
|
28
|
public void componentDidDisappear(String id, String componentName) {
|
29
|
|
- emit(componentDidDisappear, id);
|
|
29
|
+ WritableMap map = Arguments.createMap();
|
|
30
|
+ map.putString("componentId", id);
|
|
31
|
+ map.putString("componentName", componentName);
|
|
32
|
+
|
|
33
|
+ emit(componentDidDisappear, map);
|
30
|
34
|
}
|
31
|
35
|
|
32
|
36
|
public void componentDidAppear(String id, String componentName) {
|
33
|
|
- emit(componentDidAppear, id);
|
34
|
|
- }
|
|
37
|
+ WritableMap map = Arguments.createMap();
|
|
38
|
+ map.putString("componentId", id);
|
|
39
|
+ map.putString("componentName", componentName);
|
35
|
40
|
|
36
|
|
- @NonNull
|
37
|
|
- private WritableMap getLifecycleEventData(String id, String componentName, String didAppear) {
|
38
|
|
- WritableMap map = Arguments.createMap();
|
39
|
|
- map.putString("componentId", id);
|
40
|
|
- map.putString("componentName", componentName);
|
41
|
|
- map.putString("event", didAppear);
|
42
|
|
- return map;
|
43
|
|
- }
|
|
41
|
+ emit(componentDidAppear, map);
|
|
42
|
+ }
|
44
|
43
|
|
45
|
44
|
public void sendOnNavigationButtonPressed(String id, String buttonId) {
|
46
|
45
|
WritableMap map = Arguments.createMap();
|
|
@@ -57,8 +56,4 @@ public class NavigationEvent {
|
57
|
56
|
private void emit(String eventName, WritableMap data) {
|
58
|
57
|
emitter.emit(eventName, data);
|
59
|
58
|
}
|
60
|
|
-
|
61
|
|
- private void emit(String eventName, String param) {
|
62
|
|
- emitter.emit(eventName, param);
|
63
|
|
- }
|
64
|
59
|
}
|