Skip to content

Commit 436294b

Browse files
committed
fix bug in firing push subscription observer
* calculateIsOptedIn and calculateIsEnabled were not actually using the passed in arguments
1 parent 504eace commit 436294b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,13 @@ extension OSSubscriptionModel {
293293
// Calculates if the device is opted in to push notification.
294294
// Must have permission and not be opted out.
295295
func calculateIsOptedIn(accepted: Bool, isDisabled: Bool) -> Bool {
296-
return _accepted && !_isDisabled
296+
return accepted && !isDisabled
297297
}
298298

299299
// Calculates if push notifications are enabled on the device.
300300
// Does not consider the existence of the subscription_id, as we send this in the request to create a push subscription.
301301
func calculateIsEnabled(address: String?, accepted: Bool, isDisabled: Bool) -> Bool {
302-
return (self.address != nil) && _accepted && !_isDisabled
302+
return address != nil && accepted && !isDisabled
303303
}
304304

305305
func updateNotificationTypes() {

0 commit comments

Comments
 (0)