Fixes #1619 - Remove push notification registration on logout
This commit is contained in:
committed by
Stefan Ceriu
parent
c438cde085
commit
5e3944c512
@@ -527,11 +527,13 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
||||
return
|
||||
}
|
||||
|
||||
// The user will log out, clear any existing notifications
|
||||
// The user will log out, clear any existing notifications and unregister from receving new ones
|
||||
UNUserNotificationCenter.current().removeAllPendingNotificationRequests()
|
||||
UNUserNotificationCenter.current().removeAllDeliveredNotifications()
|
||||
UIApplication.shared.applicationIconBadgeNumber = 0
|
||||
|
||||
unregisterForRemoteNotifications()
|
||||
|
||||
Task {
|
||||
// First log out from the server
|
||||
let accountLogoutURL = await userSession.clientProxy.logout()
|
||||
|
||||
1
changelog.d/1619.bugfix
Normal file
1
changelog.d/1619.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Remove push notification registration on logout
|
||||
Reference in New Issue
Block a user