Skip to content

Commit

Permalink
fix(iOS): Allow the original delegate to handle non-Notifee notificat…
Browse files Browse the repository at this point in the history
…ions first (#985)

* fix(ios) allow the original delegate to handle non-Notifee notifications first

* chore: update ios simulator to iPhone 15
  • Loading branch information
gotcha84 authored Jun 11, 2024
1 parent 3949930 commit c9593cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,13 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center

// handle notification outside of notifee
if (notifeeNotification == nil) {
notifeeNotification =
[NotifeeCoreUtil parseUNNotificationRequest:response.notification.request];
if (_originalDelegate != nil && originalUNCDelegateRespondsTo.didReceiveNotificationResponse) {
[_originalDelegate userNotificationCenter:center
didReceiveNotificationResponse:response
withCompletionHandler:completionHandler];
} else {
notifeeNotification = [NotifeeCoreUtil parseUNNotificationRequest:response.notification.request];
}
}

if (notifeeNotification != nil) {
Expand Down Expand Up @@ -247,11 +252,6 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
completionHandler();
});

} else if (_originalDelegate != nil &&
originalUNCDelegateRespondsTo.didReceiveNotificationResponse) {
[_originalDelegate userNotificationCenter:center
didReceiveNotificationResponse:response
withCompletionHandler:completionHandler];
}
}

Expand Down

0 comments on commit c9593cd

Please sign in to comment.