From ed27c2d7e3c7d47542355cec2d8e58b505d13945 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 14 Sep 2023 22:35:01 -0700 Subject: [PATCH] Continue renaming Id to ID. --- .../Feedly/FeedlyAccountDelegate.swift | 2 +- .../Feedly/FeedlyFeedContainerValidator.swift | 4 +- .../Operations/FeedlySyncAllOperation.swift | 44 +++++++++---------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift b/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift index d18e93f8c..c10addea2 100644 --- a/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift +++ b/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift @@ -122,7 +122,7 @@ final class FeedlyAccountDelegate: AccountDelegate, Logging { return } - let syncAllOperation = FeedlySyncAllOperation(account: account, feedlyUserId: credentials.username, caller: caller, database: database, lastSuccessfulFetchStartDate: accountMetadata?.lastArticleFetchStartTime, downloadProgress: refreshProgress) + let syncAllOperation = FeedlySyncAllOperation(account: account, feedlyUserID: credentials.username, caller: caller, database: database, lastSuccessfulFetchStartDate: accountMetadata?.lastArticleFetchStartTime, downloadProgress: refreshProgress) syncAllOperation.downloadProgress = refreshProgress diff --git a/Account/Sources/Account/Feedly/FeedlyFeedContainerValidator.swift b/Account/Sources/Account/Feedly/FeedlyFeedContainerValidator.swift index f01e59bf1..4e10eddb1 100644 --- a/Account/Sources/Account/Feedly/FeedlyFeedContainerValidator.swift +++ b/Account/Sources/Account/Feedly/FeedlyFeedContainerValidator.swift @@ -16,10 +16,10 @@ struct FeedlyFeedContainerValidator { throw FeedlyAccountDelegateError.addFeedChooseFolder } - guard let collectionId = folder.externalID else { + guard let collectionID = folder.externalID else { throw FeedlyAccountDelegateError.addFeedInvalidFolder(folder) } - return (folder, collectionId) + return (folder, collectionID) } } diff --git a/Account/Sources/Account/Feedly/Operations/FeedlySyncAllOperation.swift b/Account/Sources/Account/Feedly/Operations/FeedlySyncAllOperation.swift index 3b56ecab1..25c265e54 100644 --- a/Account/Sources/Account/Feedly/Operations/FeedlySyncAllOperation.swift +++ b/Account/Sources/Account/Feedly/Operations/FeedlySyncAllOperation.swift @@ -32,7 +32,7 @@ final class FeedlySyncAllOperation: FeedlyOperation, Logging { /// /// Download articles for statuses at the union of those statuses without its corresponding article and those included in 3 (changed since last successful sync). /// - init(account: Account, feedlyUserId: String, lastSuccessfulFetchStartDate: Date?, markArticlesService: FeedlyMarkArticlesService, getUnreadService: FeedlyGetStreamIDsService, getCollectionsService: FeedlyGetCollectionsService, getStreamContentsService: FeedlyGetStreamContentsService, getStarredService: FeedlyGetStreamIDsService, getStreamIdsService: FeedlyGetStreamIDsService, getEntriesService: FeedlyGetEntriesService, database: SyncDatabase, downloadProgress: DownloadProgress) { + init(account: Account, feedlyUserID: String, lastSuccessfulFetchStartDate: Date?, markArticlesService: FeedlyMarkArticlesService, getUnreadService: FeedlyGetStreamIDsService, getCollectionsService: FeedlyGetCollectionsService, getStreamContentsService: FeedlyGetStreamContentsService, getStarredService: FeedlyGetStreamIDsService, getStreamIdsService: FeedlyGetStreamIDsService, getEntriesService: FeedlyGetEntriesService, database: SyncDatabase, downloadProgress: DownloadProgress) { self.syncUUID = UUID() self.operationQueue.suspend() @@ -65,52 +65,52 @@ final class FeedlySyncAllOperation: FeedlyOperation, Logging { createFeedsOperation.addDependency(mirrorCollectionsAsFolders) self.operationQueue.add(createFeedsOperation) - let getAllArticleIds = FeedlyIngestStreamArticleIDsOperation(account: account, userId: feedlyUserId, service: getStreamIdsService) - getAllArticleIds.delegate = self - getAllArticleIds.downloadProgress = downloadProgress - getAllArticleIds.addDependency(createFeedsOperation) - self.operationQueue.add(getAllArticleIds) + let getAllArticleIDs = FeedlyIngestStreamArticleIDsOperation(account: account, userId: feedlyUserID, service: getStreamIdsService) + getAllArticleIDs.delegate = self + getAllArticleIDs.downloadProgress = downloadProgress + getAllArticleIDs.addDependency(createFeedsOperation) + self.operationQueue.add(getAllArticleIDs) // Get each page of unread article ids in the global.all stream for the last 31 days (nil = Feedly API default). - let getUnread = FeedlyIngestUnreadArticleIDsOperation(account: account, userID: feedlyUserId, service: getUnreadService, database: database, newerThan: nil) + let getUnread = FeedlyIngestUnreadArticleIDsOperation(account: account, userID: feedlyUserID, service: getUnreadService, database: database, newerThan: nil) getUnread.delegate = self - getUnread.addDependency(getAllArticleIds) + getUnread.addDependency(getAllArticleIDs) getUnread.downloadProgress = downloadProgress self.operationQueue.add(getUnread) // Get each page of the article ids which have been update since the last successful fetch start date. // If the date is nil, this operation provides an empty set (everything is new, nothing is updated). - let getUpdated = FeedlyGetUpdatedArticleIDsOperation(account: account, userID: feedlyUserId, service: getStreamIdsService, newerThan: lastSuccessfulFetchStartDate) + let getUpdated = FeedlyGetUpdatedArticleIDsOperation(account: account, userID: feedlyUserID, service: getStreamIdsService, newerThan: lastSuccessfulFetchStartDate) getUpdated.delegate = self getUpdated.downloadProgress = downloadProgress getUpdated.addDependency(createFeedsOperation) self.operationQueue.add(getUpdated) // Get each page of the article ids for starred articles. - let getStarred = FeedlyIngestStarredArticleIdsOperation(account: account, userId: feedlyUserId, service: getStarredService, database: database, newerThan: nil) + let getStarred = FeedlyIngestStarredArticleIdsOperation(account: account, userId: feedlyUserID, service: getStarredService, database: database, newerThan: nil) getStarred.delegate = self getStarred.downloadProgress = downloadProgress getStarred.addDependency(createFeedsOperation) self.operationQueue.add(getStarred) // Now all the possible article ids we need have a status, fetch the article ids for missing articles. - let getMissingIds = FeedlyFetchIdsForMissingArticlesOperation(account: account) - getMissingIds.delegate = self - getMissingIds.downloadProgress = downloadProgress - getMissingIds.addDependency(getAllArticleIds) - getMissingIds.addDependency(getUnread) - getMissingIds.addDependency(getStarred) - getMissingIds.addDependency(getUpdated) - self.operationQueue.add(getMissingIds) + let getMissingIDs = FeedlyFetchIdsForMissingArticlesOperation(account: account) + getMissingIDs.delegate = self + getMissingIDs.downloadProgress = downloadProgress + getMissingIDs.addDependency(getAllArticleIDs) + getMissingIDs.addDependency(getUnread) + getMissingIDs.addDependency(getStarred) + getMissingIDs.addDependency(getUpdated) + self.operationQueue.add(getMissingIDs) // Download all the missing and updated articles let downloadMissingArticles = FeedlyDownloadArticlesOperation(account: account, - missingArticleEntryIdProvider: getMissingIds, + missingArticleEntryIdProvider: getMissingIDs, updatedArticleEntryIdProvider: getUpdated, getEntriesService: getEntriesService) downloadMissingArticles.delegate = self downloadMissingArticles.downloadProgress = downloadProgress - downloadMissingArticles.addDependency(getMissingIds) + downloadMissingArticles.addDependency(getMissingIDs) downloadMissingArticles.addDependency(getUpdated) self.operationQueue.add(downloadMissingArticles) @@ -122,8 +122,8 @@ final class FeedlySyncAllOperation: FeedlyOperation, Logging { self.operationQueue.add(finishOperation) } - convenience init(account: Account, feedlyUserId: String, caller: FeedlyAPICaller, database: SyncDatabase, lastSuccessfulFetchStartDate: Date?, downloadProgress: DownloadProgress) { - self.init(account: account, feedlyUserId: feedlyUserId, lastSuccessfulFetchStartDate: lastSuccessfulFetchStartDate, markArticlesService: caller, getUnreadService: caller, getCollectionsService: caller, getStreamContentsService: caller, getStarredService: caller, getStreamIdsService: caller, getEntriesService: caller, database: database, downloadProgress: downloadProgress) + convenience init(account: Account, feedlyUserID: String, caller: FeedlyAPICaller, database: SyncDatabase, lastSuccessfulFetchStartDate: Date?, downloadProgress: DownloadProgress) { + self.init(account: account, feedlyUserID: feedlyUserID, lastSuccessfulFetchStartDate: lastSuccessfulFetchStartDate, markArticlesService: caller, getUnreadService: caller, getCollectionsService: caller, getStreamContentsService: caller, getStarredService: caller, getStreamIdsService: caller, getEntriesService: caller, database: database, downloadProgress: downloadProgress) } override func run() {