Commit a1911b32 authored by Omri Bruchim's avatar Omri Bruchim

Fix: Handling first push notification (when opening app with push) without...

Fix: Handling first push notification (when opening app with push)  without remove it from bridgeQueue, cause triggering same action multiple times.
parent 3dd4e463
...@@ -507,12 +507,14 @@ RCT_EXPORT_METHOD(consumeBackgroundQueue) ...@@ -507,12 +507,14 @@ RCT_EXPORT_METHOD(consumeBackgroundQueue)
// Push opened local notifications // Push opened local notifications
NSDictionary* openedLocalNotification = [RNNotificationsBridgeQueue sharedInstance].openedLocalNotification; NSDictionary* openedLocalNotification = [RNNotificationsBridgeQueue sharedInstance].openedLocalNotification;
if (openedLocalNotification) { if (openedLocalNotification) {
[RNNotificationsBridgeQueue sharedInstance].openedLocalNotification = nil;
[RNNotifications didNotificationOpen:openedLocalNotification]; [RNNotifications didNotificationOpen:openedLocalNotification];
} }
// Push opened remote notifications // Push opened remote notifications
NSDictionary* openedRemoteNotification = [RNNotificationsBridgeQueue sharedInstance].openedRemoteNotification; NSDictionary* openedRemoteNotification = [RNNotificationsBridgeQueue sharedInstance].openedRemoteNotification;
if (openedRemoteNotification) { if (openedRemoteNotification) {
[RNNotificationsBridgeQueue sharedInstance].openedRemoteNotification = nil;
[RNNotifications didNotificationOpen:openedRemoteNotification]; [RNNotifications didNotificationOpen:openedRemoteNotification];
} }
} }
......
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