From 09bfd76af9af00349de3353cdb59d2e627385860 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Tue, 12 Sep 2023 21:24:12 -0700 Subject: [PATCH] Rename FeedlyEntryIdentifierProviding.entryIds to FeedlyEntryIdentifierProviding.entryIDs. --- .../Models/FeedlyEntryIdentifierProviding.swift | 16 ++++++++-------- .../FeedlyDownloadArticlesOperation.swift | 6 +++--- ...edlyFetchIdsForMissingArticlesOperation.swift | 4 ++-- .../Operations/FeedlyGetEntriesOperation.swift | 2 +- .../Operations/FeedlyGetStreamIdsOperation.swift | 2 +- .../FeedlyGetUpdatedArticleIdsOperation.swift | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Account/Sources/Account/Feedly/Models/FeedlyEntryIdentifierProviding.swift b/Account/Sources/Account/Feedly/Models/FeedlyEntryIdentifierProviding.swift index a87fbc4ea..76679224a 100644 --- a/Account/Sources/Account/Feedly/Models/FeedlyEntryIdentifierProviding.swift +++ b/Account/Sources/Account/Feedly/Models/FeedlyEntryIdentifierProviding.swift @@ -9,21 +9,21 @@ import Foundation protocol FeedlyEntryIdentifierProviding: AnyObject { - var entryIds: Set { get } + var entryIDs: Set { get } } final class FeedlyEntryIdentifierProvider: FeedlyEntryIdentifierProviding { - private (set) var entryIds: Set + private (set) var entryIDs: Set - init(entryIds: Set = Set()) { - self.entryIds = entryIds + init(entryIDs: Set = Set()) { + self.entryIDs = entryIDs } - func addEntryIds(from provider: FeedlyEntryIdentifierProviding) { - entryIds.formUnion(provider.entryIds) + func addEntryIDs(from provider: FeedlyEntryIdentifierProviding) { + entryIDs.formUnion(provider.entryIDs) } - func addEntryIds(in articleIds: [String]) { - entryIds.formUnion(articleIds) + func addEntryIDs(in articleIDs: [String]) { + entryIDs.formUnion(articleIDs) } } diff --git a/Account/Sources/Account/Feedly/Operations/FeedlyDownloadArticlesOperation.swift b/Account/Sources/Account/Feedly/Operations/FeedlyDownloadArticlesOperation.swift index 06a28ccb2..20a9262be 100644 --- a/Account/Sources/Account/Feedly/Operations/FeedlyDownloadArticlesOperation.swift +++ b/Account/Sources/Account/Feedly/Operations/FeedlyDownloadArticlesOperation.swift @@ -32,15 +32,15 @@ class FeedlyDownloadArticlesOperation: FeedlyOperation, Logging { } override func run() { - var articleIds = missingArticleEntryIdProvider.entryIds - articleIds.formUnion(updatedArticleEntryIdProvider.entryIds) + var articleIds = missingArticleEntryIdProvider.entryIDs + articleIds.formUnion(updatedArticleEntryIdProvider.entryIDs) self.logger.debug("Requesting \(articleIds.count, privacy: .public) articles.") let feedlyAPILimitBatchSize = 1000 for articleIds in Array(articleIds).chunked(into: feedlyAPILimitBatchSize) { - let provider = FeedlyEntryIdentifierProvider(entryIds: Set(articleIds)) + let provider = FeedlyEntryIdentifierProvider(entryIDs: Set(articleIds)) let getEntries = FeedlyGetEntriesOperation(account: account, service: getEntriesService, provider: provider) getEntries.delegate = self self.operationQueue.add(getEntries) diff --git a/Account/Sources/Account/Feedly/Operations/FeedlyFetchIdsForMissingArticlesOperation.swift b/Account/Sources/Account/Feedly/Operations/FeedlyFetchIdsForMissingArticlesOperation.swift index 90cbdde50..a62f5923c 100644 --- a/Account/Sources/Account/Feedly/Operations/FeedlyFetchIdsForMissingArticlesOperation.swift +++ b/Account/Sources/Account/Feedly/Operations/FeedlyFetchIdsForMissingArticlesOperation.swift @@ -13,7 +13,7 @@ final class FeedlyFetchIdsForMissingArticlesOperation: FeedlyOperation, FeedlyEn private let account: Account - private(set) var entryIds = Set() + private(set) var entryIDs = Set() init(account: Account) { self.account = account @@ -23,7 +23,7 @@ final class FeedlyFetchIdsForMissingArticlesOperation: FeedlyOperation, FeedlyEn account.fetchArticleIDsForStatusesWithoutArticlesNewerThanCutoffDate { result in switch result { case .success(let articleIds): - self.entryIds.formUnion(articleIds) + self.entryIDs.formUnion(articleIds) self.didFinish() case .failure(let error): diff --git a/Account/Sources/Account/Feedly/Operations/FeedlyGetEntriesOperation.swift b/Account/Sources/Account/Feedly/Operations/FeedlyGetEntriesOperation.swift index f064488a4..45be9a966 100644 --- a/Account/Sources/Account/Feedly/Operations/FeedlyGetEntriesOperation.swift +++ b/Account/Sources/Account/Feedly/Operations/FeedlyGetEntriesOperation.swift @@ -53,7 +53,7 @@ final class FeedlyGetEntriesOperation: FeedlyOperation, FeedlyEntryProviding, Fe } override func run() { - service.getEntries(for: provider.entryIds) { result in + service.getEntries(for: provider.entryIDs) { result in switch result { case .success(let entries): self.entries = entries diff --git a/Account/Sources/Account/Feedly/Operations/FeedlyGetStreamIdsOperation.swift b/Account/Sources/Account/Feedly/Operations/FeedlyGetStreamIdsOperation.swift index 2812460e8..39f6feed1 100644 --- a/Account/Sources/Account/Feedly/Operations/FeedlyGetStreamIdsOperation.swift +++ b/Account/Sources/Account/Feedly/Operations/FeedlyGetStreamIdsOperation.swift @@ -16,7 +16,7 @@ protocol FeedlyGetStreamIdsOperationDelegate: AnyObject { /// Single responsibility is to get the stream ids from Feedly. final class FeedlyGetStreamIdsOperation: FeedlyOperation, FeedlyEntryIdentifierProviding, Logging { - var entryIds: Set { + var entryIDs: Set { guard let ids = streamIds?.ids else { assertionFailure("Has this operation been addeded as a dependency on the caller?") return [] diff --git a/Account/Sources/Account/Feedly/Operations/FeedlyGetUpdatedArticleIdsOperation.swift b/Account/Sources/Account/Feedly/Operations/FeedlyGetUpdatedArticleIdsOperation.swift index f826db7b3..219469b1e 100644 --- a/Account/Sources/Account/Feedly/Operations/FeedlyGetUpdatedArticleIdsOperation.swift +++ b/Account/Sources/Account/Feedly/Operations/FeedlyGetUpdatedArticleIdsOperation.swift @@ -33,7 +33,7 @@ class FeedlyGetUpdatedArticleIdsOperation: FeedlyOperation, FeedlyEntryIdentifie self.init(account: account, resource: all, service: service, newerThan: newerThan) } - var entryIds: Set { + var entryIDs: Set { return storedUpdatedArticleIds }