Skip to content

Commit c611fa1

Browse files
committed
Fix logged-out logic to de-register device from Push Notifications
1 parent 2079b0a commit c611fa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DEV-Simple/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class ViewController: UIViewController {
169169
// Clear out the subscription because it failed so it can try again next time
170170
pushNotificationSubscription = ""
171171
}
172-
} else if !pushNotificationSubscription.isEmpty {
172+
} else if webView.userData?.userID == nil && !pushNotificationSubscription.isEmpty {
173173
// This means we had already subscribed to an interest for the logged-in user but
174174
// since `webView.userData` is now nil the user has just logged out.
175175
do {

0 commit comments

Comments
 (0)