From 433d64669b0ac6d921e5116d69b470c66a54dfaf Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 28 Apr 2024 13:04:14 -0700 Subject: [PATCH] Delete unused FeedlyGetStreamIDsOperation. --- .../FeedlyGetStreamIDsOperation.swift | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 Feedly/Sources/Feedly/Operations/FeedlyGetStreamIDsOperation.swift diff --git a/Feedly/Sources/Feedly/Operations/FeedlyGetStreamIDsOperation.swift b/Feedly/Sources/Feedly/Operations/FeedlyGetStreamIDsOperation.swift deleted file mode 100644 index 2aaa4d71e..000000000 --- a/Feedly/Sources/Feedly/Operations/FeedlyGetStreamIDsOperation.swift +++ /dev/null @@ -1,64 +0,0 @@ -// -// FeedlyGetStreamIDsOperation.swift -// Account -// -// Created by Kiel Gillard on 18/10/19. -// Copyright © 2019 Ranchero Software, LLC. All rights reserved. -// - -import Foundation -import os.log - -public protocol FeedlyGetStreamIDsOperationDelegate: AnyObject { - - func feedlyGetStreamIDsOperation(_ operation: FeedlyGetStreamIDsOperation, didGet streamIDs: FeedlyStreamIDs) -} - -/// Single responsibility is to get the stream ids from Feedly. -public final class FeedlyGetStreamIDsOperation: FeedlyOperation, FeedlyEntryIdentifierProviding { - - public var entryIDs: Set { - guard let ids = streamIDs?.ids else { - assertionFailure("Has this operation been addeded as a dependency on the caller?") - return [] - } - return Set(ids) - } - - private(set) var streamIDs: FeedlyStreamIDs? - - let service: FeedlyGetStreamIDsService - let continuation: String? - let resource: FeedlyResourceID - let unreadOnly: Bool? - let newerThan: Date? - let log: OSLog - - init(resource: FeedlyResourceID, service: FeedlyGetStreamIDsService, continuation: String? = nil, newerThan: Date? = nil, unreadOnly: Bool?, log: OSLog) { - - self.resource = resource - self.service = service - self.continuation = continuation - self.newerThan = newerThan - self.unreadOnly = unreadOnly - self.log = log - } - - weak var streamIDsDelegate: FeedlyGetStreamIDsOperationDelegate? - - public override func run() { - - Task { @MainActor in - - do { - let stream = try await service.getStreamIDs(for: resource, continuation: continuation, newerThan: newerThan, unreadOnly: unreadOnly) - self.streamIDs = stream - self.streamIDsDelegate?.feedlyGetStreamIDsOperation(self, didGet: stream) - self.didFinish() - } catch { - os_log(.debug, log: self.log, "Unable to get stream ids: %{public}@.", error as NSError) - self.didFinish(with: error) - } - } - } -}