Remove references to isFeedProvider.
This commit is contained in:
parent
3aeda820e4
commit
7e4c5be30f
|
@ -152,14 +152,9 @@ public final class WebFeed: Feed, Renamable, Hashable {
|
||||||
|
|
||||||
public var isArticleExtractorAlwaysOn: Bool? {
|
public var isArticleExtractorAlwaysOn: Bool? {
|
||||||
get {
|
get {
|
||||||
if isFeedProvider == true { return false } // not an option for FeedProviders
|
metadata.isArticleExtractorAlwaysOn
|
||||||
return metadata.isArticleExtractorAlwaysOn
|
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
if isFeedProvider == true {
|
|
||||||
metadata.isArticleExtractorAlwaysOn = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
metadata.isArticleExtractorAlwaysOn = newValue
|
metadata.isArticleExtractorAlwaysOn = newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,10 +139,8 @@ private extension WebFeedInspectorViewController {
|
||||||
updateNotifyAboutNewArticles()
|
updateNotifyAboutNewArticles()
|
||||||
updateIsReaderViewAlwaysOn()
|
updateIsReaderViewAlwaysOn()
|
||||||
windowTitle = feed?.nameForDisplay ?? NSLocalizedString("Feed Inspector", comment: "Feed Inspector window title")
|
windowTitle = feed?.nameForDisplay ?? NSLocalizedString("Feed Inspector", comment: "Feed Inspector window title")
|
||||||
|
isReaderViewAlwaysOnCheckBox?.isEnabled = true
|
||||||
view.needsLayout = true
|
view.needsLayout = true
|
||||||
if let webfeed = feed {
|
|
||||||
webfeed.isFeedProvider ? (isReaderViewAlwaysOnCheckBox?.isEnabled = false) : (isReaderViewAlwaysOnCheckBox?.isEnabled = true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateImage() {
|
func updateImage() {
|
||||||
|
|
|
@ -1145,13 +1145,8 @@ private extension MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
if let webfeed = currentTimelineViewController?.selectedArticles.first?.webFeed {
|
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 {
|
guard let state = articleExtractor?.state else {
|
||||||
toolbarButton.buttonState = .off
|
toolbarButton.buttonState = .off
|
||||||
|
@ -1177,13 +1172,8 @@ private extension MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
if let webfeed = currentTimelineViewController?.selectedArticles.first?.webFeed {
|
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
|
toolbarButton.state = isShowingExtractedArticle ? .on : .off
|
||||||
|
|
||||||
|
|
|
@ -240,8 +240,6 @@ private extension SidebarViewController {
|
||||||
}
|
}
|
||||||
menu.addItem(notificationMenuItem)
|
menu.addItem(notificationMenuItem)
|
||||||
|
|
||||||
|
|
||||||
if !webFeed.isFeedProvider {
|
|
||||||
let articleExtractorText = NSLocalizedString("Always Use Reader View", comment: "Always Use Reader View")
|
let articleExtractorText = NSLocalizedString("Always Use Reader View", comment: "Always Use Reader View")
|
||||||
let articleExtractorMenuItem = menuItem(articleExtractorText, #selector(toggleArticleExtractorFromContextMenu(_:)), webFeed)
|
let articleExtractorMenuItem = menuItem(articleExtractorText, #selector(toggleArticleExtractorFromContextMenu(_:)), webFeed)
|
||||||
|
|
||||||
|
@ -251,8 +249,6 @@ private extension SidebarViewController {
|
||||||
articleExtractorMenuItem.state = .on
|
articleExtractorMenuItem.state = .on
|
||||||
}
|
}
|
||||||
menu.addItem(articleExtractorMenuItem)
|
menu.addItem(articleExtractorMenuItem)
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
menu.addItem(NSMenuItem.separator())
|
menu.addItem(NSMenuItem.separator())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue