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