From 4787931c6442d7f9e54cc2df3e6d614ed28824f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kiel=20Gillard=20=F0=9F=A4=AA?= Date: Thu, 1 Oct 2020 14:09:41 +1000 Subject: [PATCH] Ensure the add new feedly feed completion handler is called when a feed is not found. Fixes #2470 --- .../Feedly/Operations/FeedlyAddNewFeedOperation.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Frameworks/Account/Feedly/Operations/FeedlyAddNewFeedOperation.swift b/Frameworks/Account/Feedly/Operations/FeedlyAddNewFeedOperation.swift index 200554ed3..b1a549607 100644 --- a/Frameworks/Account/Feedly/Operations/FeedlyAddNewFeedOperation.swift +++ b/Frameworks/Account/Feedly/Operations/FeedlyAddNewFeedOperation.swift @@ -67,6 +67,13 @@ class FeedlyAddNewFeedOperation: FeedlyOperation, FeedlyOperationDelegate, Feedl addCompletionHandler = nil super.didCancel() } + + override func didFinish(with error: Error) { + assert(Thread.isMainThread) + addCompletionHandler?(.failure(error)) + addCompletionHandler = nil + super.didFinish(with: error) + } func feedlySearchOperation(_ operation: FeedlySearchOperation, didGet response: FeedlyFeedsSearchResponse) { guard !isCanceled else {