Refactor the code to be slightly more clear in purpose

This commit is contained in:
Maurice Parker 2020-05-08 01:48:35 -05:00
parent 73627a60ca
commit ec499b1347
1 changed files with 5 additions and 6 deletions

View File

@ -512,8 +512,10 @@ private extension CloudKitAccountDelegate {
case .success:
self.refreshProgress.completeTask()
self.combinedRefresh(account, webFeeds) {
self.refreshProgress.clear()
account.metadata.lastArticleFetchEndTime = Date()
self.sendArticleStatus(for: account, showProgress: true) { _ in
self.refreshProgress.clear()
account.metadata.lastArticleFetchEndTime = Date()
}
}
case .failure(let error):
fail(error)
@ -571,10 +573,7 @@ private extension CloudKitAccountDelegate {
}
group.notify(queue: DispatchQueue.main) {
self.sendArticleStatus(for: account, showProgress: true) { _ in
self.refreshProgress.completeTask()
completion()
}
completion()
}
}