|
|
|
|
205
|
}
|
205
|
}
|
206
|
|
206
|
|
207
|
- (void)sendScreenChangedEvent:(NSString *)eventName {
|
207
|
- (void)sendScreenChangedEvent:(NSString *)eventName {
|
208
|
- if (self.view != nil) {
|
|
|
209
|
- RCTRootView *rootView = self.view;
|
|
|
|
|
208
|
+ if ([self.view isKindOfClass:[RCTRootView class]]) {
|
|
|
209
|
+ RCTRootView *rootView = (RCTRootView *)self.view;
|
210
|
|
210
|
|
211
|
if (rootView.appProperties && rootView.appProperties[@"navigatorEventID"]) {
|
211
|
if (rootView.appProperties && rootView.appProperties[@"navigatorEventID"]) {
|
212
|
|
212
|
|
|
|
|
|
220
|
}
|
220
|
}
|
221
|
|
221
|
|
222
|
- (void)sendGlobalScreenEvent:(NSString *)eventName endTimestampString:(NSString *)endTimestampStr shouldReset:(BOOL)shouldReset {
|
222
|
- (void)sendGlobalScreenEvent:(NSString *)eventName endTimestampString:(NSString *)endTimestampStr shouldReset:(BOOL)shouldReset {
|
223
|
- if (self.view != nil){
|
|
|
224
|
- RCTRootView *rootView = self.view;
|
|
|
225
|
- NSString *screenName = [rootView moduleName];
|
|
|
226
|
-
|
|
|
|
|
223
|
+ if ([self.view isKindOfClass:[RCTRootView class]]){
|
|
|
224
|
+ NSString *screenName = [((RCTRootView *)self.view) moduleName];
|
|
|
225
|
+
|
227
|
[[[RCCManager sharedInstance] getBridge].eventDispatcher sendAppEventWithName:eventName body:@
|
226
|
[[[RCCManager sharedInstance] getBridge].eventDispatcher sendAppEventWithName:eventName body:@
|
228
|
{
|
227
|
{
|
229
|
@"commandType": self.commandType ? self.commandType : @"",
|
228
|
@"commandType": self.commandType ? self.commandType : @"",
|