diff --git a/Account/Sources/Account/CloudKit/CloudKitAccountDelegate.swift b/Account/Sources/Account/CloudKit/CloudKitAccountDelegate.swift index c7371079d..808d2add8 100644 --- a/Account/Sources/Account/CloudKit/CloudKitAccountDelegate.swift +++ b/Account/Sources/Account/CloudKit/CloudKitAccountDelegate.swift @@ -398,8 +398,9 @@ final class CloudKitAccountDelegate: AccountDelegate { self.database.insertStatuses(syncStatuses) { _ in self.database.selectPendingCount { result in if let count = try? result.get(), count > 100 { - self.sendArticleStatus(for: account, showProgress: false, completion: completion) + self.sendArticleStatus(for: account, showProgress: false) { _ in } } + completion(.success(())) } } case .failure(let error): diff --git a/Account/Sources/Account/FeedWrangler/FeedWranglerAccountDelegate.swift b/Account/Sources/Account/FeedWrangler/FeedWranglerAccountDelegate.swift index 057585745..11e7d130b 100644 --- a/Account/Sources/Account/FeedWrangler/FeedWranglerAccountDelegate.swift +++ b/Account/Sources/Account/FeedWrangler/FeedWranglerAccountDelegate.swift @@ -465,8 +465,9 @@ final class FeedWranglerAccountDelegate: AccountDelegate { self.database.insertStatuses(syncStatuses) { _ in self.database.selectPendingCount { result in if let count = try? result.get(), count > 100 { - self.sendArticleStatus(for: account, completion: completion) + self.sendArticleStatus(for: account) { _ in } } + completion(.success(())) } } case .failure(let error): diff --git a/Account/Sources/Account/Feedbin/FeedbinAccountDelegate.swift b/Account/Sources/Account/Feedbin/FeedbinAccountDelegate.swift index 678c73a2e..78d81d4ee 100644 --- a/Account/Sources/Account/Feedbin/FeedbinAccountDelegate.swift +++ b/Account/Sources/Account/Feedbin/FeedbinAccountDelegate.swift @@ -547,8 +547,9 @@ final class FeedbinAccountDelegate: AccountDelegate { self.database.insertStatuses(syncStatuses) { _ in self.database.selectPendingCount { result in if let count = try? result.get(), count > 100 { - self.sendArticleStatus(for: account, completion: completion) + self.sendArticleStatus(for: account) { _ in } } + completion(.success(())) } } case .failure(let error): diff --git a/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift b/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift index e6672472b..1cd3e2aed 100644 --- a/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift +++ b/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift @@ -498,8 +498,9 @@ final class FeedlyAccountDelegate: AccountDelegate { self.database.insertStatuses(syncStatuses) { _ in self.database.selectPendingCount { result in if let count = try? result.get(), count > 100 { - self.sendArticleStatus(for: account, completion: completion) + self.sendArticleStatus(for: account) { _ in } } + completion(.success(())) } } case .failure(let error): diff --git a/Account/Sources/Account/NewsBlur/NewsBlurAccountDelegate.swift b/Account/Sources/Account/NewsBlur/NewsBlurAccountDelegate.swift index 85f41a2ab..b13ba7da1 100644 --- a/Account/Sources/Account/NewsBlur/NewsBlurAccountDelegate.swift +++ b/Account/Sources/Account/NewsBlur/NewsBlurAccountDelegate.swift @@ -575,8 +575,9 @@ final class NewsBlurAccountDelegate: AccountDelegate { self.database.insertStatuses(syncStatuses) { _ in self.database.selectPendingCount { result in if let count = try? result.get(), count > 100 { - self.sendArticleStatus(for: account, completion: completion) + self.sendArticleStatus(for: account) { _ in } } + completion(.success(())) } } case .failure(let error): diff --git a/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift b/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift index 060ba2bbb..6afb25e87 100644 --- a/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift +++ b/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift @@ -540,8 +540,9 @@ final class ReaderAPIAccountDelegate: AccountDelegate { self.database.insertStatuses(syncStatuses) { _ in self.database.selectPendingCount { result in if let count = try? result.get(), count > 100 { - self.sendArticleStatus(for: account, completion: completion) + self.sendArticleStatus(for: account) { _ in } } + completion(.success(())) } } case .failure(let error): diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 02346c5f7..87d9ba4d1 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -1377,6 +1377,7 @@ private extension SceneCoordinator { func markArticlesWithUndo(_ articles: [Article], statusKey: ArticleStatus.Key, flag: Bool, completion: (() -> Void)? = nil) { guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: articles, statusKey: statusKey, flag: flag, undoManager: undoManager, completion: completion) else { + completion?() return } runCommand(markReadCommand)