Commit cbfe67ca by Sebastián Katzer

Call the saved delegate not only for push notifications

parent 63c99d3e
......@@ -507,12 +507,12 @@
{
UNNotificationRequest* toast = notification.request;
if ([toast.trigger isKindOfClass:UNPushNotificationTrigger.class]) {
[_delegate userNotificationCenter:center
willPresentNotification:notification
withCompletionHandler:completionHandler];
if ([toast.trigger isKindOfClass:UNPushNotificationTrigger.class])
return;
}
APPNotificationOptions* options = toast.options;
......@@ -539,14 +539,14 @@
{
UNNotificationRequest* toast = response.notification.request;
completionHandler();
if ([toast.trigger isKindOfClass:UNPushNotificationTrigger.class]) {
[_delegate userNotificationCenter:center
didReceiveNotificationResponse:response
withCompletionHandler:completionHandler];
completionHandler();
if ([toast.trigger isKindOfClass:UNPushNotificationTrigger.class])
return;
}
NSMutableDictionary* data = [[NSMutableDictionary alloc] init];
NSString* action = response.actionIdentifier;
......@@ -585,8 +585,8 @@
{
eventQueue = [[NSMutableArray alloc] init];
_center = [UNUserNotificationCenter currentNotificationCenter];
_delegate = _center.delegate;
_center.delegate = self;
[_center registerGeneralNotificationCategory];
......@@ -715,4 +715,3 @@
}
@end
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