mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Continue renaming webFeed to feed.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user