Fixes #1573 - Retract all notifications and app badges when signing out

This commit is contained in:
Stefan Ceriu
2023-09-05 15:35:04 +03:00
committed by Stefan Ceriu
parent f1758b5994
commit e9a945cfe4
@@ -412,6 +412,11 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
return
}
// The user will log out, clear any existing notifications
UNUserNotificationCenter.current().removeAllPendingNotificationRequests()
UNUserNotificationCenter.current().removeAllDeliveredNotifications()
UIApplication.shared.applicationIconBadgeNumber = 0
Task {
// First log out from the server
let accountLogoutURL = await userSession.clientProxy.logout()