mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Fixes #1619 - Remove push notification registration on logout
This commit is contained in:
committed by
Stefan Ceriu
parent
ab1c7c1c9a
commit
259baeaf99
@@ -527,11 +527,13 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
|||||||
return
|
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().removeAllPendingNotificationRequests()
|
||||||
UNUserNotificationCenter.current().removeAllDeliveredNotifications()
|
UNUserNotificationCenter.current().removeAllDeliveredNotifications()
|
||||||
UIApplication.shared.applicationIconBadgeNumber = 0
|
UIApplication.shared.applicationIconBadgeNumber = 0
|
||||||
|
|
||||||
|
unregisterForRemoteNotifications()
|
||||||
|
|
||||||
Task {
|
Task {
|
||||||
// First log out from the server
|
// First log out from the server
|
||||||
let accountLogoutURL = await userSession.clientProxy.logout()
|
let accountLogoutURL = await userSession.clientProxy.logout()
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Remove push notification registration on logout
|
||||||
Reference in New Issue
Block a user