mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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 notificationCenter: UserNotificationCenterProtocol
|
||||||
private let appSettings: AppSettings
|
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 cancellables = Set<AnyCancellable>()
|
||||||
private var notificationsEnabled = false
|
private var notificationsEnabled = false
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix pushers not being registered on re-login after recent Onboarding changes
|
||||||
Reference in New Issue
Block a user