From 3cb47afe65e7d4975b93732496c0292530726e4a Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Sun, 2 Aug 2020 08:43:24 -0400 Subject: [PATCH] Group all update-UI functions together in file --- Mac/Inspector/WebFeedInspectorViewController.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Mac/Inspector/WebFeedInspectorViewController.swift b/Mac/Inspector/WebFeedInspectorViewController.swift index 9a8336cb0..5e35e19a7 100644 --- a/Mac/Inspector/WebFeedInspectorViewController.swift +++ b/Mac/Inspector/WebFeedInspectorViewController.swift @@ -163,6 +163,14 @@ private extension WebFeedInspectorViewController { urlTextField?.stringValue = feed?.url ?? "" } + func updateNotifyAboutNewArticles() { + isNotifyAboutNewArticlesCheckBox?.state = (feed?.isNotifyAboutNewArticles ?? false) ? .on : .off + } + + func updateIsReaderViewAlwaysOn() { + isReaderViewAlwaysOnCheckBox?.state = (feed?.isArticleExtractorAlwaysOn ?? false) ? .on : .off + } + func updateNotificationSettings() { UNUserNotificationCenter.current().getNotificationSettings { (settings) in DispatchQueue.main.async { @@ -186,12 +194,6 @@ private extension WebFeedInspectorViewController { NSWorkspace.shared.open(URL(fileURLWithPath: "x-apple.systempreferences:com.apple.preference")) } } - - func updateNotifyAboutNewArticles() { - isNotifyAboutNewArticlesCheckBox?.state = (feed?.isNotifyAboutNewArticles ?? false) ? .on : .off } - func updateIsReaderViewAlwaysOn() { - isReaderViewAlwaysOnCheckBox?.state = (feed?.isArticleExtractorAlwaysOn ?? false) ? .on : .off - } }