File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
6363 setupCocoaLumberjack ( )
6464 setupLibraryLogger ( )
6565 setupLogLevel ( . verbose)
66- /// We're sending notifications for logged in state only.
67- /// Revisit this check if a local notification in unauthenticated state is needed.
68- if stores. isAuthenticated {
69- setupPushNotificationsManagerIfPossible ( pushNotesManager, stores: stores)
70- }
66+ setupPushNotificationsManagerIfPossible ( pushNotesManager, stores: stores)
7167 setupAppRatingManager ( )
7268 setupWormholy ( )
7369 setupKeyboardStateProvider ( )
@@ -276,6 +272,9 @@ extension AppDelegate {
276272 #if targetEnvironment(simulator)
277273 DDLogVerbose ( " 👀 Push Notifications are not supported in the Simulator! " )
278274 #else
275+ /// We're sending notifications for logged in state only.
276+ /// Revisit this check if a local notification in unauthenticated state is needed.
277+ guard stores. isAuthenticated else { return }
279278 let pushNotesManager = ServiceLocator . pushNotesManager
280279 pushNotesManager. registerForRemoteNotifications ( )
281280 pushNotesManager. ensureAuthorizationIsRequested ( includesProvisionalAuth: false , onCompletion: nil )
You can’t perform that action at this time.
0 commit comments