mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
FIxes #2602 - Fix pushers not being registered on re-login after recent Onboarding changes
This commit is contained in:
committed by
Stefan Ceriu
parent
27605da0bb
commit
2e6c5c036a
@@ -23,7 +23,18 @@ final class NotificationManager: NSObject, NotificationManagerProtocol {
|
||||
private let notificationCenter: UserNotificationCenterProtocol
|
||||
private let appSettings: AppSettings
|
||||
|
||||
private var userSession: UserSessionProtocol?
|
||||
private var userSession: UserSessionProtocol? {
|
||||
didSet {
|
||||
// If notification permissions were given previously then attempt re-registering
|
||||
// for remote notifications on startup. Otherwise let the onboarding flow handle it
|
||||
Task { @MainActor in
|
||||
if await self.notificationCenter.authorizationStatus() == .authorized {
|
||||
self.delegate?.registerForRemoteNotifications()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
private var notificationsEnabled = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user