From 51a4a2b3c8a6af6e77848eb832a5a05c035c3899 Mon Sep 17 00:00:00 2001 From: Anh Do Date: Sat, 21 Mar 2020 18:33:31 -0400 Subject: [PATCH] Rename subscriptionID to externalID --- .../Internals/NewsBlurAccountDelegate+Internal.swift | 8 ++++---- Frameworks/Account/NewsBlur/NewsBlurAccountDelegate.swift | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Frameworks/Account/NewsBlur/Internals/NewsBlurAccountDelegate+Internal.swift b/Frameworks/Account/NewsBlur/Internals/NewsBlurAccountDelegate+Internal.swift index 113e3b763..0cadff712 100644 --- a/Frameworks/Account/NewsBlur/Internals/NewsBlurAccountDelegate+Internal.swift +++ b/Frameworks/Account/NewsBlur/Internals/NewsBlurAccountDelegate+Internal.swift @@ -108,7 +108,7 @@ extension NewsBlurAccountDelegate { // If the name has been changed on the server remove the locally edited name webFeed.editedName = nil webFeed.homePageURL = feed.homePageURL - webFeed.subscriptionID = String(feed.feedID) + webFeed.externalID = String(feed.feedID) webFeed.faviconURL = feed.faviconURL } else { @@ -119,7 +119,7 @@ extension NewsBlurAccountDelegate { // Actually add feeds all in one go, so we don’t trigger various rebuilding things that Account does. feedsToAdd.forEach { feed in let webFeed = account.createWebFeed(with: feed.name, url: feed.feedURL, webFeedID: String(feed.feedID), homePageURL: feed.homePageURL) - webFeed.subscriptionID = String(feed.feedID) + webFeed.externalID = String(feed.feedID) account.addWebFeed(webFeed) } } @@ -380,7 +380,7 @@ extension NewsBlurAccountDelegate { DispatchQueue.main.async { let webFeed = account.createWebFeed(with: feed.name, url: feed.feedURL, webFeedID: String(feed.feedID), homePageURL: feed.homePageURL) - webFeed.subscriptionID = String(feed.feedID) + webFeed.externalID = String(feed.feedID) webFeed.faviconURL = feed.faviconURL account.addWebFeed(webFeed, to: container) { result in @@ -474,7 +474,7 @@ extension NewsBlurAccountDelegate { func deleteFeed(for account: Account, with feed: WebFeed, from container: Container?, completion: @escaping (Result) -> Void) { // This error should never happen - guard let feedID = feed.subscriptionID else { + guard let feedID = feed.externalID else { completion(.failure(NewsBlurError.invalidParameter)) return } diff --git a/Frameworks/Account/NewsBlur/NewsBlurAccountDelegate.swift b/Frameworks/Account/NewsBlur/NewsBlurAccountDelegate.swift index f7a69454e..68a77a74d 100644 --- a/Frameworks/Account/NewsBlur/NewsBlurAccountDelegate.swift +++ b/Frameworks/Account/NewsBlur/NewsBlurAccountDelegate.swift @@ -389,8 +389,8 @@ final class NewsBlurAccountDelegate: AccountDelegate { for feed in folder.topLevelWebFeeds { if (feed.folderRelationship?.count ?? 0) > 1 { clearFolderRelationship(for: feed, withFolderName: folderToRemove) - } else if let subscriptionID = feed.subscriptionID { - feedIDs.append(subscriptionID) + } else if let feedID = feed.externalID { + feedIDs.append(feedID) } } @@ -430,7 +430,7 @@ final class NewsBlurAccountDelegate: AccountDelegate { func renameWebFeed(for account: Account, with feed: WebFeed, to name: String, completion: @escaping (Result) -> ()) { // This error should never happen - guard let feedID = feed.subscriptionID else { + guard let feedID = feed.externalID else { completion(.failure(NewsBlurError.invalidParameter)) return }