Make progress indicator more accurate

This commit is contained in:
Maurice Parker 2019-05-21 08:34:05 -05:00
parent 3207ebf6a5
commit d9458c8980
1 changed files with 3 additions and 3 deletions

View File

@ -1015,7 +1015,6 @@ private extension FeedbinAccountDelegate {
let group = DispatchGroup()
let chunkedArticleIDs = articleIDs.chunked(into: 100)
refreshProgress.addToNumberOfTasks(chunkedArticleIDs.count - 1)
for chunk in chunkedArticleIDs {
@ -1026,7 +1025,6 @@ private extension FeedbinAccountDelegate {
case .success(let entries):
self?.processEntries(account: account, entries: entries) {
self?.refreshProgress.completeTask()
group.leave()
}
@ -1040,7 +1038,9 @@ private extension FeedbinAccountDelegate {
}
group.notify(queue: DispatchQueue.main) {
group.notify(queue: DispatchQueue.main) { [weak self] in
guard let self = self else { return }
self.refreshProgress.completeTask()
os_log(.debug, log: self.log, "Done refreshing missing articles.")
completion()
}