Remove extraneous complete task functions that were throwing off the progress indicator. Fixes #2543

This commit is contained in:
Maurice Parker 2020-11-20 16:00:31 -06:00
parent 49d1d18f99
commit 970e68da35
2 changed files with 1 additions and 3 deletions

View File

@ -16,6 +16,7 @@ import SyncDatabase
import os.log
extension NewsBlurAccountDelegate {
func refreshFeeds(for account: Account, completion: @escaping (Result<Void, Error>) -> Void) {
os_log(.debug, log: log, "Refreshing feeds...")
@ -27,8 +28,6 @@ extension NewsBlurAccountDelegate {
self.syncFeeds(account, feeds)
self.syncFeedFolderRelationship(account, folders)
}
self.refreshProgress.completeTask()
completion(.success(()))
case .failure(let error):
completion(.failure(error))

View File

@ -246,7 +246,6 @@ final class NewsBlurAccountDelegate: AccountDelegate {
caller.retrieveUnreadStoryHashes { result in
switch result {
case .success(let storyHashes):
self.refreshProgress.completeTask()
if let count = storyHashes?.count, count > 0 {
self.refreshProgress.addToNumberOfTasksAndRemaining((count - 1) / 100 + 1)