From bf1a732e8fc8311666c055fe073a558c0de1a528 Mon Sep 17 00:00:00 2001 From: Anh Do Date: Fri, 13 Mar 2020 21:28:59 -0400 Subject: [PATCH] Add missing story fetching handler --- .../Account/NewsBlur/NewsBlurAccountDelegate.swift | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Frameworks/Account/NewsBlur/NewsBlurAccountDelegate.swift b/Frameworks/Account/NewsBlur/NewsBlurAccountDelegate.swift index 4c7bc2595..37a2c252d 100644 --- a/Frameworks/Account/NewsBlur/NewsBlurAccountDelegate.swift +++ b/Frameworks/Account/NewsBlur/NewsBlurAccountDelegate.swift @@ -232,14 +232,13 @@ extension NewsBlurAccountDelegate { caller.retrieveFeeds { result in switch result { case .success((let feeds, let folders)): - self.refreshProgress.completeTask() - BatchUpdate.shared.perform { self.syncFolders(account, folders) self.syncFeeds(account, feeds) self.syncFeedFolderRelationship(account, folders) } + self.refreshProgress.completeTask() completion(.success(())) case .failure(let error): completion(.failure(error)) @@ -451,7 +450,15 @@ extension NewsBlurAccountDelegate { return } - self.refreshUnreadStories(for: account, hashes: Array(hashes[numberOfStories...]), updateFetchDate: updateFetchDate, completion: completion) + self.refreshUnreadStories(for: account, hashes: Array(hashes[numberOfStories...]), updateFetchDate: updateFetchDate) { result in + os_log(.debug, log: self.log, "Done refreshing stories.") + switch result { + case .success: + completion(.success(())) + case .failure(let error): + completion(.failure(error)) + } + } } case .failure(let error): completion(.failure(error))