Commit 882775fb authored by Artal Druk's avatar Artal Druk

fixed merge issues after revert commits

parent 99717b14
...@@ -271,23 +271,20 @@ RCT_EXPORT_MODULE() ...@@ -271,23 +271,20 @@ RCT_EXPORT_MODULE()
+ (void)didReceiveLocalNotification:(UILocalNotification *)notification + (void)didReceiveLocalNotification:(UILocalNotification *)notification
{ {
UIApplicationState state = [UIApplication sharedApplication].applicationState;
return @[ RNNotificationsRegistered, NSMutableDictionary* newUserInfo = notification.userInfo.mutableCopy;
RNNotificationsRegistrationFailed, [newUserInfo removeObjectForKey:@"__id"];
RNNotificationReceivedForeground, notification.userInfo = newUserInfo;
RNNotificationReceivedBackground,
RNNotificationOpened,
RNNotificationActionReceived,
RNPushKitRegistered,
RNNotificationActionTriggered];
}
-(void) checkAndSendEvent:(NSString*)name body:(id)body if (state == UIApplicationStateActive) {
{ [self didReceiveNotificationOnForegroundState:notification.userInfo];
if(_hasListeners) } else if (state == UIApplicationStateInactive) {
{ NSString* notificationId = [notification.userInfo objectForKey:@"notificationId"];
[self sendEventWithName:name body:body]; if (notificationId) {
[self clearNotificationFromNotificationsCenter:notificationId];
}
[self didNotificationOpen:notification.userInfo];
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment