Continue renaming webFeed to feed.

This commit is contained in:
Brent Simmons
2024-11-01 22:09:22 -07:00
parent fac4eded60
commit 2d3ef95619
40 changed files with 286 additions and 286 deletions

View File

@@ -116,7 +116,7 @@ class ActivityManager {
}
}
for webFeed in account.flattenedWebFeeds() {
for webFeed in account.flattenedFeeds() {
ids.append(contentsOf: identifiers(for: webFeed))
}
@@ -127,7 +127,7 @@ class ActivityManager {
var ids = [String]()
ids.append(identifier(for: folder))
for webFeed in folder.flattenedWebFeeds() {
for webFeed in folder.flattenedFeeds() {
ids.append(contentsOf: identifiers(for: webFeed))
}
@@ -140,7 +140,7 @@ class ActivityManager {
#endif
@objc func webFeedIconDidBecomeAvailable(_ note: Notification) {
guard let webFeed = note.userInfo?[UserInfoKey.webFeed] as? Feed, let activityFeedId = selectingActivity?.userInfo?[ArticlePathKey.webFeedID] as? String else {
guard let webFeed = note.userInfo?[UserInfoKey.feed] as? Feed, let activityFeedId = selectingActivity?.userInfo?[ArticlePathKey.webFeedID] as? String else {
return
}
@@ -150,7 +150,7 @@ class ActivityManager {
}
#endif
if activityFeedId == webFeed.webFeedID {
if activityFeedId == webFeed.feedID {
updateSelectingActivityFeedSearchAttributes(with: webFeed)
}
}
@@ -278,7 +278,7 @@ private extension ActivityManager {
}
static func identifier(for feed: Feed) -> String {
return "account_\(feed.account!.accountID)_feed_\(feed.webFeedID)"
return "account_\(feed.account!.accountID)_feed_\(feed.feedID)"
}
static func identifier(for article: Article) -> String {

View File

@@ -125,7 +125,7 @@ extension Article {
if let image = iconImage() {
let fm = FileManager.default
var path = fm.urls(for: .cachesDirectory, in: .userDomainMask)[0]
let feedID = webFeed.webFeedID.replacingOccurrences(of: "/", with: "_")
let feedID = webFeed.feedID.replacingOccurrences(of: "/", with: "_")
#if os(macOS)
path.appendPathComponent(feedID + "_smallIcon.tiff")
#else

View File

@@ -180,7 +180,7 @@ private extension FeedIconDownloader {
func postFeedIconDidBecomeAvailableNotification(_ feed: Feed) {
DispatchQueue.main.async {
let userInfo: [AnyHashable: Any] = [UserInfoKey.webFeed: feed]
let userInfo: [AnyHashable: Any] = [UserInfoKey.feed: feed]
NotificationCenter.default.post(name: .FeedIconDidBecomeAvailable, object: self, userInfo: userInfo)
}
}

View File

@@ -154,7 +154,7 @@ private extension ExtensionFeedAddRequestFile {
guard let container = destinationContainer else { return }
account.createWebFeed(url: request.feedURL.absoluteString, name: request.name, container: container, validateFeed: true) { _ in }
account.createFeed(url: request.feedURL.absoluteString, name: request.name, container: container, validateFeed: true) { _ in }
}
}

View File

@@ -11,7 +11,7 @@ import RSTree
import Articles
import Account
final class WebFeedTreeControllerDelegate: TreeControllerDelegate {
final class FeedTreeControllerDelegate: TreeControllerDelegate {
private var filterExceptions = Set<SidebarItemIdentifier>()
var isReadFiltered = false
@@ -39,7 +39,7 @@ final class WebFeedTreeControllerDelegate: TreeControllerDelegate {
}
}
private extension WebFeedTreeControllerDelegate {
private extension FeedTreeControllerDelegate {
func childNodesForRootNode(_ rootNode: Node) -> [Node]? {
var topLevelNodes = [Node]()
@@ -66,7 +66,7 @@ private extension WebFeedTreeControllerDelegate {
var children = [AnyObject]()
for webFeed in container.topLevelWebFeeds {
for webFeed in container.topLevelFeeds {
if let feedID = webFeed.sidebarItemID, !(!filterExceptions.contains(feedID) && isReadFiltered && webFeed.unreadCount == 0) {
children.append(webFeed)
}

View File

@@ -10,7 +10,7 @@ import Foundation
struct UserInfoKey {
static let webFeed = "webFeed"
static let feed = "feed"
static let url = "url"
static let articlePath = "articlePath"
static let feedIdentifier = "feedIdentifier"

View File

@@ -61,7 +61,7 @@ private extension UserNotificationManager {
content.subtitle = ArticleStringFormatter.truncatedTitle(article)
}
content.body = ArticleStringFormatter.truncatedSummary(article)
content.threadIdentifier = webFeed.webFeedID
content.threadIdentifier = webFeed.feedID
content.summaryArgument = "\(webFeed.nameForDisplay)"
content.summaryArgumentCount = 1
content.sound = UNNotificationSound.default
@@ -83,7 +83,7 @@ private extension UserNotificationManager {
/// - Warning: In certain scenarios, this will return the `faviconTemplateImage`.
func thumbnailAttachment(for article: Article, webFeed: Feed) -> UNNotificationAttachment? {
if let imageURL = article.iconImageUrl(webFeed: webFeed) {
let thumbnail = try? UNNotificationAttachment(identifier: webFeed.webFeedID, url: imageURL, options: nil)
let thumbnail = try? UNNotificationAttachment(identifier: webFeed.feedID, url: imageURL, options: nil)
return thumbnail
}
return nil