Fix regression where marking all as unread wouldn't take you back to the sidebar

This commit is contained in:
Maurice Parker 2021-04-12 21:09:34 -05:00
parent f2bbacc871
commit 8f0519ca47
7 changed files with 13 additions and 6 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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)