Rename subscriptionID to externalID

This commit is contained in:
Anh Do 2020-03-21 18:33:31 -04:00
parent 20ff053335
commit 51a4a2b3c8
No known key found for this signature in database
GPG Key ID: 451E3092F917B62D
2 changed files with 7 additions and 7 deletions

View File

@ -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 dont 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, Error>) -> Void) {
// This error should never happen
guard let feedID = feed.subscriptionID else {
guard let feedID = feed.externalID else {
completion(.failure(NewsBlurError.invalidParameter))
return
}

View File

@ -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<Void, Error>) -> ()) {
// This error should never happen
guard let feedID = feed.subscriptionID else {
guard let feedID = feed.externalID else {
completion(.failure(NewsBlurError.invalidParameter))
return
}