From be8fedbf1186e5f1d8f1a23d5f066e72d4d16b4f Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Sun, 2 Aug 2020 08:49:37 -0400 Subject: [PATCH] Use conditional in guard statement instead of setting an unused variable --- Mac/Inspector/WebFeedInspectorViewController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Mac/Inspector/WebFeedInspectorViewController.swift b/Mac/Inspector/WebFeedInspectorViewController.swift index 5f2a13a65..ce0b608c0 100644 --- a/Mac/Inspector/WebFeedInspectorViewController.swift +++ b/Mac/Inspector/WebFeedInspectorViewController.swift @@ -56,8 +56,10 @@ final class WebFeedInspectorViewController: NSViewController, Inspector { // MARK: Actions @IBAction func isNotifyAboutNewArticlesChanged(_ sender: Any) { - guard let settings = userNotificationSettings else { - isNotifyAboutNewArticlesCheckBox.setNextState() + guard userNotificationSettings != nil else { + DispatchQueue.main.async { + self.isNotifyAboutNewArticlesCheckBox.setNextState() + } return }