Skip to content

Commit

Permalink
FIxes #2602 - Fix pushers not being registered on re-login after rece…
Browse files Browse the repository at this point in the history
…nt Onboarding changes
  • Loading branch information
stefanceriu committed Apr 1, 2024
1 parent 27605da commit 2fa4a2f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions changelog.d/2602.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix pushers not being registered on re-login after recent Onboarding changes

0 comments on commit 2fa4a2f

Please sign in to comment.