From 62ee961d6ebffe529bdfa938443e1f25a0201e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=E1=BA=A7n=20Trung=20Ki=C3=AAn?= Date: Sat, 15 Aug 2020 06:07:34 +0700 Subject: [PATCH] fix(messaging, ios): call original delegate when intercepting willPresentNotification (#4088) --- .../RNFBMessaging/RNFBMessaging+UNUserNotificationCenter.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/messaging/ios/RNFBMessaging/RNFBMessaging+UNUserNotificationCenter.m b/packages/messaging/ios/RNFBMessaging/RNFBMessaging+UNUserNotificationCenter.m index 0269284b..541114d9 100644 --- a/packages/messaging/ios/RNFBMessaging/RNFBMessaging+UNUserNotificationCenter.m +++ b/packages/messaging/ios/RNFBMessaging/RNFBMessaging+UNUserNotificationCenter.m @@ -75,7 +75,9 @@ struct { // TODO in a later version allow customising completion options in JS code completionHandler(UNNotificationPresentationOptionNone); - } else if (_originalDelegate != nil && originalDelegateRespondsTo.willPresentNotification) { + } + + if (_originalDelegate != nil && originalDelegateRespondsTo.willPresentNotification) { [_originalDelegate userNotificationCenter:center willPresentNotification:notification withCompletionHandler:completionHandler]; } else { completionHandler(UNNotificationPresentationOptionNone);