Remove last references to isFeedProvider. Fix a couple warnings.

This commit is contained in:
Brent Simmons 2023-06-25 16:19:20 -07:00
parent 7e4c5be30f
commit 4f5d287ef8
5 changed files with 3 additions and 26 deletions

View File

@ -123,7 +123,7 @@ final class LocalAccountDelegate: AccountDelegate {
}
func createWebFeed(for account: Account, url urlString: String, name: String?, container: Container, validateFeed: Bool, completion: @escaping (Result<WebFeed, Error>) -> Void) {
guard let url = URL(string: urlString), let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false) else {
guard let url = URL(string: urlString) else {
completion(.failure(LocalAccountDelegateError.invalidParameter))
return
}

View File

@ -221,18 +221,6 @@ public final class WebFeed: Feed, Renamable, Hashable {
}
}
// MARK: - Feed Provider
public var isFeedProvider: Bool {
get {
guard let webfeedURL = URL(string: url),
let components = URLComponents(url: webfeedURL, resolvingAgainstBaseURL: false) else {
return false
}
return false
}
}
// MARK: - NotificationDisplayName
public var notificationDisplayName: String {
#if os(macOS)

View File

@ -455,7 +455,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
}
let isDisplayingSheet = mainWindowController?.isDisplayingSheet ?? false
let isSpecialAccountAvailable = AccountManager.shared.activeAccounts.contains(where: { $0.type == .onMyMac || $0.type == .cloudKit })
if item.action == #selector(refreshAll(_:)) {
return !AccountManager.shared.refreshInProgress && !AccountManager.shared.activeAccounts.isEmpty

View File

@ -191,11 +191,7 @@ class ArticleViewController: UIViewController {
starBarButtonItem.isEnabled = true
let permalinkPresent = article.preferredLink != nil
var isFeedProvider = false
if let webfeed = article.webFeed {
isFeedProvider = webfeed.isFeedProvider
}
articleExtractorButton.isEnabled = permalinkPresent && !AppDefaults.shared.isDeveloperBuild && !isFeedProvider
articleExtractorButton.isEnabled = permalinkPresent && !AppDefaults.shared.isDeveloperBuild
actionBarButtonItem.isEnabled = permalinkPresent
if article.status.read {

View File

@ -43,13 +43,7 @@ class WebFeedInspectorViewController: UITableViewController {
notifyAboutNewArticlesSwitch.setOn(webFeed.isNotifyAboutNewArticles ?? false, animated: false)
if webFeed.isFeedProvider {
alwaysShowReaderViewSwitch.isOn = false
alwaysShowReaderViewSwitch.isEnabled = false
} else {
alwaysShowReaderViewSwitch.setOn(webFeed.isArticleExtractorAlwaysOn ?? false, animated: false)
}
alwaysShowReaderViewSwitch.setOn(webFeed.isArticleExtractorAlwaysOn ?? false, animated: false)
homePageLabel.text = webFeed.homePageURL?.decodedURLString
feedURLLabel.text = webFeed.url.decodedURLString