|
@@ -94,7 +94,7 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
94
|
94
|
final LayoutNode layoutTree = LayoutNodeParser.parse(jsonParser.parse(rawLayoutTree).optJSONObject("root"));
|
95
|
95
|
handle(() -> {
|
96
|
96
|
final ViewController viewController = layoutFactory.create(layoutTree);
|
97
|
|
- navigator().setRoot(viewController, new NativeCommandListener(commandId, promise, eventEmitter, now), reactInstanceManager);
|
|
97
|
+ navigator().setRoot(viewController, new NativeCommandListener("setRoot", commandId, promise, eventEmitter, now), reactInstanceManager);
|
98
|
98
|
});
|
99
|
99
|
}
|
100
|
100
|
|
|
@@ -117,7 +117,7 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
117
|
117
|
final LayoutNode layoutTree = LayoutNodeParser.parse(jsonParser.parse(rawLayoutTree));
|
118
|
118
|
handle(() -> {
|
119
|
119
|
final ViewController viewController = layoutFactory.create(layoutTree);
|
120
|
|
- navigator().push(onComponentId, viewController, new NativeCommandListener(commandId, promise, eventEmitter, now));
|
|
120
|
+ navigator().push(onComponentId, viewController, new NativeCommandListener("push", commandId, promise, eventEmitter, now));
|
121
|
121
|
});
|
122
|
122
|
}
|
123
|
123
|
|
|
@@ -129,23 +129,23 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
129
|
129
|
final LayoutNode layoutTree = LayoutNodeParser.parse(jsonParser.parse(children.getMap(i)));
|
130
|
130
|
_children.add(layoutFactory.create(layoutTree));
|
131
|
131
|
}
|
132
|
|
- navigator().setStackRoot(onComponentId, _children, new NativeCommandListener(commandId, promise, eventEmitter, now));
|
|
132
|
+ navigator().setStackRoot(onComponentId, _children, new NativeCommandListener("setStackRoot", commandId, promise, eventEmitter, now));
|
133
|
133
|
});
|
134
|
134
|
}
|
135
|
135
|
|
136
|
136
|
@ReactMethod
|
137
|
137
|
public void pop(String commandId, String componentId, @Nullable ReadableMap mergeOptions, Promise promise) {
|
138
|
|
- handle(() -> navigator().pop(componentId, parse(mergeOptions), new NativeCommandListener(commandId, promise, eventEmitter, now)));
|
|
138
|
+ handle(() -> navigator().pop(componentId, parse(mergeOptions), new NativeCommandListener("pop", commandId, promise, eventEmitter, now)));
|
139
|
139
|
}
|
140
|
140
|
|
141
|
141
|
@ReactMethod
|
142
|
142
|
public void popTo(String commandId, String componentId, @Nullable ReadableMap mergeOptions, Promise promise) {
|
143
|
|
- handle(() -> navigator().popTo(componentId, parse(mergeOptions), new NativeCommandListener(commandId, promise, eventEmitter, now)));
|
|
143
|
+ handle(() -> navigator().popTo(componentId, parse(mergeOptions), new NativeCommandListener("popTo", commandId, promise, eventEmitter, now)));
|
144
|
144
|
}
|
145
|
145
|
|
146
|
146
|
@ReactMethod
|
147
|
147
|
public void popToRoot(String commandId, String componentId, @Nullable ReadableMap mergeOptions, Promise promise) {
|
148
|
|
- handle(() -> navigator().popToRoot(componentId, parse(mergeOptions), new NativeCommandListener(commandId, promise, eventEmitter, now)));
|
|
148
|
+ handle(() -> navigator().popToRoot(componentId, parse(mergeOptions), new NativeCommandListener("popToRoot", commandId, promise, eventEmitter, now)));
|
149
|
149
|
}
|
150
|
150
|
|
151
|
151
|
@ReactMethod
|
|
@@ -153,7 +153,7 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
153
|
153
|
final LayoutNode layoutTree = LayoutNodeParser.parse(jsonParser.parse(rawLayoutTree));
|
154
|
154
|
handle(() -> {
|
155
|
155
|
final ViewController viewController = layoutFactory.create(layoutTree);
|
156
|
|
- navigator().showModal(viewController, new NativeCommandListener(commandId, promise, eventEmitter, now));
|
|
156
|
+ navigator().showModal(viewController, new NativeCommandListener("showModal", commandId, promise, eventEmitter, now));
|
157
|
157
|
});
|
158
|
158
|
}
|
159
|
159
|
|
|
@@ -161,13 +161,13 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
161
|
161
|
public void dismissModal(String commandId, String componentId, @Nullable ReadableMap mergeOptions, Promise promise) {
|
162
|
162
|
handle(() -> {
|
163
|
163
|
navigator().mergeOptions(componentId, parse(mergeOptions));
|
164
|
|
- navigator().dismissModal(componentId, new NativeCommandListener(commandId, promise, eventEmitter, now));
|
|
164
|
+ navigator().dismissModal(componentId, new NativeCommandListener("dismissModal", commandId, promise, eventEmitter, now));
|
165
|
165
|
});
|
166
|
166
|
}
|
167
|
167
|
|
168
|
168
|
@ReactMethod
|
169
|
169
|
public void dismissAllModals(String commandId, @Nullable ReadableMap mergeOptions, Promise promise) {
|
170
|
|
- handle(() -> navigator().dismissAllModals(parse(mergeOptions), new NativeCommandListener(commandId, promise, eventEmitter, now)));
|
|
170
|
+ handle(() -> navigator().dismissAllModals(parse(mergeOptions), new NativeCommandListener("dismissAllModals", commandId, promise, eventEmitter, now)));
|
171
|
171
|
}
|
172
|
172
|
|
173
|
173
|
@ReactMethod
|
|
@@ -175,13 +175,13 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
175
|
175
|
final LayoutNode layoutTree = LayoutNodeParser.parse(jsonParser.parse(rawLayoutTree));
|
176
|
176
|
handle(() -> {
|
177
|
177
|
final ViewController viewController = layoutFactory.create(layoutTree);
|
178
|
|
- navigator().showOverlay(viewController, new NativeCommandListener(commandId, promise, eventEmitter, now));
|
|
178
|
+ navigator().showOverlay(viewController, new NativeCommandListener("showOverlay", commandId, promise, eventEmitter, now));
|
179
|
179
|
});
|
180
|
180
|
}
|
181
|
181
|
|
182
|
182
|
@ReactMethod
|
183
|
183
|
public void dismissOverlay(String commandId, String componentId, Promise promise) {
|
184
|
|
- handle(() -> navigator().dismissOverlay(componentId, new NativeCommandListener(commandId, promise, eventEmitter, now)));
|
|
184
|
+ handle(() -> navigator().dismissOverlay(componentId, new NativeCommandListener("dismissOverlay", commandId, promise, eventEmitter, now)));
|
185
|
185
|
}
|
186
|
186
|
|
187
|
187
|
private Navigator navigator() {
|