Add completion callbacks so that we can ensure that unreads have been marked before determining the next unread. Fixes #2993

This commit is contained in:
Maurice Parker
2021-04-12 19:41:01 -05:00
parent 3a1b3f96bb
commit c95daa208f
14 changed files with 60 additions and 41 deletions

View File

@@ -428,7 +428,7 @@ private extension AppDelegate {
os_log(.debug, "No article found from search using %@", articleID)
return
}
account!.markArticles(article!, statusKey: .read, flag: true)
account!.markArticles(article!, statusKey: .read, flag: true) { _ in }
self.prepareAccountsForBackground()
account!.syncArticleStatus(completion: { [weak self] _ in
if !AccountManager.shared.isSuspended {
@@ -458,7 +458,7 @@ private extension AppDelegate {
os_log(.debug, "No article found from search using %@", articleID)
return
}
account!.markArticles(article!, statusKey: .starred, flag: true)
account!.markArticles(article!, statusKey: .starred, flag: true) { _ in }
account!.syncArticleStatus(completion: { [weak self] _ in
if !AccountManager.shared.isSuspended {
if #available(iOS 14, *) {