Skip to content

Commit d0f7852

Browse files
committed
Fixing enabled calculation
1 parent 13d7885 commit d0f7852

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
@@ -254,13 +254,13 @@ extension OSSubscriptionModel {
254254

255255
// Calculates if the device is currently able to receive a push notification.
256256
func calculateIsSubscribed(subscriptionId: String?, address: String?, accepted: Bool, isDisabled: Bool) -> Bool {
257-
return (self.subscriptionId != nil) && (self.address != nil) && _accepted && _isDisabled
257+
return (self.subscriptionId != nil) && (self.address != nil) && _accepted && !_isDisabled
258258
}
259259

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

266266
func updateNotificationTypes() {

0 commit comments

Comments
 (0)