diff --git a/Account/Sources/Account/WebFeed.swift b/Account/Sources/Account/WebFeed.swift index 1bcfc8596..3e94b7509 100644 --- a/Account/Sources/Account/WebFeed.swift +++ b/Account/Sources/Account/WebFeed.swift @@ -152,14 +152,9 @@ public final class WebFeed: Feed, Renamable, Hashable { public var isArticleExtractorAlwaysOn: Bool? { get { - if isFeedProvider == true { return false } // not an option for FeedProviders - return metadata.isArticleExtractorAlwaysOn + metadata.isArticleExtractorAlwaysOn } set { - if isFeedProvider == true { - metadata.isArticleExtractorAlwaysOn = false - return - } metadata.isArticleExtractorAlwaysOn = newValue } } diff --git a/Mac/Inspector/WebFeedInspectorViewController.swift b/Mac/Inspector/WebFeedInspectorViewController.swift index 58c24b254..39d82a9dc 100644 --- a/Mac/Inspector/WebFeedInspectorViewController.swift +++ b/Mac/Inspector/WebFeedInspectorViewController.swift @@ -139,10 +139,8 @@ private extension WebFeedInspectorViewController { updateNotifyAboutNewArticles() updateIsReaderViewAlwaysOn() windowTitle = feed?.nameForDisplay ?? NSLocalizedString("Feed Inspector", comment: "Feed Inspector window title") + isReaderViewAlwaysOnCheckBox?.isEnabled = true view.needsLayout = true - if let webfeed = feed { - webfeed.isFeedProvider ? (isReaderViewAlwaysOnCheckBox?.isEnabled = false) : (isReaderViewAlwaysOnCheckBox?.isEnabled = true) - } } func updateImage() { diff --git a/Mac/MainWindow/MainWindowController.swift b/Mac/MainWindow/MainWindowController.swift index 0fa3d5f32..1be10fa22 100644 --- a/Mac/MainWindow/MainWindowController.swift +++ b/Mac/MainWindow/MainWindowController.swift @@ -1145,12 +1145,7 @@ private extension MainWindowController { } if let webfeed = currentTimelineViewController?.selectedArticles.first?.webFeed { - if webfeed.isFeedProvider { - toolbarButton.isEnabled = false - return false - } else { - toolbarButton.isEnabled = true - } + toolbarButton.isEnabled = true } guard let state = articleExtractor?.state else { @@ -1177,12 +1172,7 @@ private extension MainWindowController { } if let webfeed = currentTimelineViewController?.selectedArticles.first?.webFeed { - if webfeed.isFeedProvider { - toolbarButton.isEnabled = false - return false - } else { - toolbarButton.isEnabled = true - } + toolbarButton.isEnabled = true } toolbarButton.state = isShowingExtractedArticle ? .on : .off diff --git a/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift b/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift index 46286cd64..3d9d4256b 100644 --- a/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift +++ b/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift @@ -239,21 +239,17 @@ private extension SidebarViewController { notificationMenuItem.state = .on } menu.addItem(notificationMenuItem) - - - if !webFeed.isFeedProvider { - let articleExtractorText = NSLocalizedString("Always Use Reader View", comment: "Always Use Reader View") - let articleExtractorMenuItem = menuItem(articleExtractorText, #selector(toggleArticleExtractorFromContextMenu(_:)), webFeed) - - if webFeed.isArticleExtractorAlwaysOn == nil || webFeed.isArticleExtractorAlwaysOn! == false { - articleExtractorMenuItem.state = .off - } else { - articleExtractorMenuItem.state = .on - } - menu.addItem(articleExtractorMenuItem) + + let articleExtractorText = NSLocalizedString("Always Use Reader View", comment: "Always Use Reader View") + let articleExtractorMenuItem = menuItem(articleExtractorText, #selector(toggleArticleExtractorFromContextMenu(_:)), webFeed) + + if webFeed.isArticleExtractorAlwaysOn == nil || webFeed.isArticleExtractorAlwaysOn! == false { + articleExtractorMenuItem.state = .off + } else { + articleExtractorMenuItem.state = .on } - - + menu.addItem(articleExtractorMenuItem) + menu.addItem(NSMenuItem.separator()) menu.addItem(renameMenuItem(webFeed))