Revert to requesting notifications on application launch so that the badge can be configured. Issue #2447

This commit is contained in:
Maurice Parker 2020-09-22 17:39:29 -05:00
parent c2d39318f9
commit bad21330f3
1 changed files with 3 additions and 3 deletions

View File

@ -91,8 +91,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
self.unreadCount = AccountManager.shared.unreadCount self.unreadCount = AccountManager.shared.unreadCount
} }
UNUserNotificationCenter.current().getNotificationSettings { (settings) in UNUserNotificationCenter.current().requestAuthorization(options:[.badge, .sound, .alert]) { (granted, error) in
if settings.authorizationStatus == .authorized { if granted {
DispatchQueue.main.async { DispatchQueue.main.async {
UIApplication.shared.registerForRemoteNotifications() UIApplication.shared.registerForRemoteNotifications()
} }