Skip to content

Commit

Permalink
fix: migrate to new API
Browse files Browse the repository at this point in the history
  • Loading branch information
WoLewicki committed Apr 12, 2024
1 parent b799f57 commit aec4f34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/Notification/PushNotification/index.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function pushNotificationEventCallback(eventType: EventType, notification: PushP
*/
function refreshNotificationOptInStatus() {
Airship.push.getNotificationStatus().then((notificationStatus) => {
const isOptedIn = notificationStatus.airshipOptIn && notificationStatus.systemEnabled;
const isOptedIn = notificationStatus.isOptedIn && notificationStatus.areNotificationsAllowed;
if (isOptedIn === isUserOptedInToPushNotifications) {
return;
}
Expand Down Expand Up @@ -94,7 +94,7 @@ const init: Init = () => {
});

// Keep track of which users have enabled push notifications via an NVP.
Airship.addListener(EventType.NotificationOptInStatus, refreshNotificationOptInStatus);
Airship.addListener(EventType.PushNotificationStatusChangedStatus, refreshNotificationOptInStatus);

ForegroundNotifications.configureForegroundNotifications();
};
Expand Down

0 comments on commit aec4f34

Please sign in to comment.