From 88ac27ef502e0c6e4c6ab20cf33c8334a5ab31ab Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Sun, 2 Aug 2020 08:45:36 -0400 Subject: [PATCH] Only dispatch UI code for async execution --- Mac/Inspector/WebFeedInspectorViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mac/Inspector/WebFeedInspectorViewController.swift b/Mac/Inspector/WebFeedInspectorViewController.swift index 91e146a8e..43f8bfed6 100644 --- a/Mac/Inspector/WebFeedInspectorViewController.swift +++ b/Mac/Inspector/WebFeedInspectorViewController.swift @@ -173,9 +173,9 @@ private extension WebFeedInspectorViewController { func updateNotificationSettings() { UNUserNotificationCenter.current().getNotificationSettings { (settings) in - DispatchQueue.main.async { - self.userNotificationSettings = settings - if settings.authorizationStatus == .authorized { + self.userNotificationSettings = settings + if settings.authorizationStatus == .authorized { + DispatchQueue.main.async { NSApplication.shared.registerForRemoteNotifications() } }