Skip to content

Commit

Permalink
Remove last references to isFeedProvider. Fix a couple warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
brentsimmons committed Jun 25, 2023
1 parent fb51185 commit 7f29579
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
12 changes: 0 additions & 12 deletions Account/Sources/Account/WebFeed.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion Mac/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions iOS/Article/ArticleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 1 addition & 7 deletions iOS/Inspector/WebFeedInspectorViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f29579

Please sign in to comment.