Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[user model] Fix firing the push subscription observer #1211

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,13 @@ extension OSSubscriptionModel {
// Calculates if the device is opted in to push notification.
// Must have permission and not be opted out.
func calculateIsOptedIn(accepted: Bool, isDisabled: Bool) -> Bool {
return _accepted && !_isDisabled
return accepted && !isDisabled
}

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

func updateNotificationTypes() {
Expand Down