mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-04 12:57:35 +01:00
Fix regression where marking all as unread wouldn't take you back to the sidebar
This commit is contained in:
parent
f2bbacc871
commit
8f0519ca47
@ -398,8 +398,9 @@ final class CloudKitAccountDelegate: AccountDelegate {
|
|||||||
self.database.insertStatuses(syncStatuses) { _ in
|
self.database.insertStatuses(syncStatuses) { _ in
|
||||||
self.database.selectPendingCount { result in
|
self.database.selectPendingCount { result in
|
||||||
if let count = try? result.get(), count > 100 {
|
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):
|
case .failure(let error):
|
||||||
|
@ -465,8 +465,9 @@ final class FeedWranglerAccountDelegate: AccountDelegate {
|
|||||||
self.database.insertStatuses(syncStatuses) { _ in
|
self.database.insertStatuses(syncStatuses) { _ in
|
||||||
self.database.selectPendingCount { result in
|
self.database.selectPendingCount { result in
|
||||||
if let count = try? result.get(), count > 100 {
|
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):
|
case .failure(let error):
|
||||||
|
@ -547,8 +547,9 @@ final class FeedbinAccountDelegate: AccountDelegate {
|
|||||||
self.database.insertStatuses(syncStatuses) { _ in
|
self.database.insertStatuses(syncStatuses) { _ in
|
||||||
self.database.selectPendingCount { result in
|
self.database.selectPendingCount { result in
|
||||||
if let count = try? result.get(), count > 100 {
|
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):
|
case .failure(let error):
|
||||||
|
@ -498,8 +498,9 @@ final class FeedlyAccountDelegate: AccountDelegate {
|
|||||||
self.database.insertStatuses(syncStatuses) { _ in
|
self.database.insertStatuses(syncStatuses) { _ in
|
||||||
self.database.selectPendingCount { result in
|
self.database.selectPendingCount { result in
|
||||||
if let count = try? result.get(), count > 100 {
|
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):
|
case .failure(let error):
|
||||||
|
@ -575,8 +575,9 @@ final class NewsBlurAccountDelegate: AccountDelegate {
|
|||||||
self.database.insertStatuses(syncStatuses) { _ in
|
self.database.insertStatuses(syncStatuses) { _ in
|
||||||
self.database.selectPendingCount { result in
|
self.database.selectPendingCount { result in
|
||||||
if let count = try? result.get(), count > 100 {
|
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):
|
case .failure(let error):
|
||||||
|
@ -540,8 +540,9 @@ final class ReaderAPIAccountDelegate: AccountDelegate {
|
|||||||
self.database.insertStatuses(syncStatuses) { _ in
|
self.database.insertStatuses(syncStatuses) { _ in
|
||||||
self.database.selectPendingCount { result in
|
self.database.selectPendingCount { result in
|
||||||
if let count = try? result.get(), count > 100 {
|
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):
|
case .failure(let error):
|
||||||
|
@ -1377,6 +1377,7 @@ private extension SceneCoordinator {
|
|||||||
func markArticlesWithUndo(_ articles: [Article], statusKey: ArticleStatus.Key, flag: Bool, completion: (() -> Void)? = nil) {
|
func markArticlesWithUndo(_ articles: [Article], statusKey: ArticleStatus.Key, flag: Bool, completion: (() -> Void)? = nil) {
|
||||||
guard let undoManager = undoManager,
|
guard let undoManager = undoManager,
|
||||||
let markReadCommand = MarkStatusCommand(initialArticles: articles, statusKey: statusKey, flag: flag, undoManager: undoManager, completion: completion) else {
|
let markReadCommand = MarkStatusCommand(initialArticles: articles, statusKey: statusKey, flag: flag, undoManager: undoManager, completion: completion) else {
|
||||||
|
completion?()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
runCommand(markReadCommand)
|
runCommand(markReadCommand)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user