Disables reader view in iOS for Feed Providers
This commit is contained in:
parent
4e517a6db4
commit
0a433b8573
|
@ -92,7 +92,7 @@ class ArticleViewController: UIViewController {
|
||||||
|
|
||||||
articleExtractorButton.addTarget(self, action: #selector(toggleArticleExtractor(_:)), for: .touchUpInside)
|
articleExtractorButton.addTarget(self, action: #selector(toggleArticleExtractor(_:)), for: .touchUpInside)
|
||||||
toolbarItems?.insert(UIBarButtonItem(customView: articleExtractorButton), at: 6)
|
toolbarItems?.insert(UIBarButtonItem(customView: articleExtractorButton), at: 6)
|
||||||
|
|
||||||
pageViewController = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal, options: [:])
|
pageViewController = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal, options: [:])
|
||||||
pageViewController.delegate = self
|
pageViewController.delegate = self
|
||||||
pageViewController.dataSource = self
|
pageViewController.dataSource = self
|
||||||
|
@ -179,7 +179,11 @@ class ArticleViewController: UIViewController {
|
||||||
starBarButtonItem.isEnabled = true
|
starBarButtonItem.isEnabled = true
|
||||||
|
|
||||||
let permalinkPresent = article.preferredLink != nil
|
let permalinkPresent = article.preferredLink != nil
|
||||||
articleExtractorButton.isEnabled = permalinkPresent && !AppDefaults.shared.isDeveloperBuild
|
var isFeedProvider = false
|
||||||
|
if let webfeed = article.webFeed {
|
||||||
|
isFeedProvider = webfeed.isFeedProvider
|
||||||
|
}
|
||||||
|
articleExtractorButton.isEnabled = permalinkPresent && !AppDefaults.shared.isDeveloperBuild && !isFeedProvider
|
||||||
actionBarButtonItem.isEnabled = permalinkPresent
|
actionBarButtonItem.isEnabled = permalinkPresent
|
||||||
|
|
||||||
if article.status.read {
|
if article.status.read {
|
||||||
|
|
|
@ -48,7 +48,14 @@ class WebFeedInspectorViewController: UITableViewController {
|
||||||
nameTextField.text = webFeed.nameForDisplay
|
nameTextField.text = webFeed.nameForDisplay
|
||||||
|
|
||||||
notifyAboutNewArticlesSwitch.setOn(webFeed.isNotifyAboutNewArticles ?? false, animated: false)
|
notifyAboutNewArticlesSwitch.setOn(webFeed.isNotifyAboutNewArticles ?? false, animated: false)
|
||||||
alwaysShowReaderViewSwitch.setOn(webFeed.isArticleExtractorAlwaysOn ?? false, animated: false)
|
|
||||||
|
if webFeed.isFeedProvider {
|
||||||
|
alwaysShowReaderViewSwitch.isOn = false
|
||||||
|
alwaysShowReaderViewSwitch.isEnabled = false
|
||||||
|
} else {
|
||||||
|
alwaysShowReaderViewSwitch.setOn(webFeed.isArticleExtractorAlwaysOn ?? false, animated: false)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
homePageLabel.text = webFeed.homePageURL?.decodedURLString
|
homePageLabel.text = webFeed.homePageURL?.decodedURLString
|
||||||
feedURLLabel.text = webFeed.url.decodedURLString
|
feedURLLabel.text = webFeed.url.decodedURLString
|
||||||
|
|
Loading…
Reference in New Issue