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,
RNNotificationsRegistrationFailed, NSMutableDictionary* newUserInfo = notification.userInfo.mutableCopy;
RNNotificationReceivedForeground, [newUserInfo removeObjectForKey:@"__id"];
RNNotificationReceivedBackground, notification.userInfo = newUserInfo;
RNNotificationOpened,
RNNotificationActionReceived, if (state == UIApplicationStateActive) {
RNPushKitRegistered, [self didReceiveNotificationOnForegroundState:notification.userInfo];
RNNotificationActionTriggered]; } else if (state == UIApplicationStateInactive) {
NSString* notificationId = [notification.userInfo objectForKey:@"notificationId"];
} if (notificationId) {
[self clearNotificationFromNotificationsCenter:notificationId];
-(void) checkAndSendEvent:(NSString*)name body:(id)body }
{ [self didNotificationOpen:notification.userInfo];
if(_hasListeners)
{
[self sendEventWithName:name body:body];
} }
} }
......
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