mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-28 01:39:47 +01:00
Remove refreshStories from refreshAll process
This commit is contained in:
parent
a7a12f3278
commit
a8f8e5f955
@ -63,7 +63,7 @@ final class NewsBlurAccountDelegate: AccountDelegate {
|
||||
}
|
||||
|
||||
func refreshAll(for account: Account, completion: @escaping (Result<Void, Error>) -> ()) {
|
||||
self.refreshProgress.addToNumberOfTasksAndRemaining(5)
|
||||
self.refreshProgress.addToNumberOfTasksAndRemaining(4)
|
||||
|
||||
refreshFeeds(for: account) { result in
|
||||
self.refreshProgress.completeTask()
|
||||
@ -80,31 +80,21 @@ final class NewsBlurAccountDelegate: AccountDelegate {
|
||||
|
||||
switch result {
|
||||
case .success:
|
||||
self.refreshStories(for: account) { result in
|
||||
self.refreshMissingStories(for: account) { result in
|
||||
self.refreshProgress.completeTask()
|
||||
|
||||
switch result {
|
||||
case .success:
|
||||
self.refreshMissingStories(for: account) { result in
|
||||
self.refreshProgress.completeTask()
|
||||
|
||||
switch result {
|
||||
case .success:
|
||||
DispatchQueue.main.async {
|
||||
completion(.success(()))
|
||||
}
|
||||
|
||||
case .failure(let error):
|
||||
DispatchQueue.main.async {
|
||||
self.refreshProgress.clear()
|
||||
let wrappedError = AccountError.wrappedError(error: error, account: account)
|
||||
completion(.failure(wrappedError))
|
||||
}
|
||||
}
|
||||
DispatchQueue.main.async {
|
||||
completion(.success(()))
|
||||
}
|
||||
|
||||
case .failure(let error):
|
||||
completion(.failure(error))
|
||||
DispatchQueue.main.async {
|
||||
self.refreshProgress.clear()
|
||||
let wrappedError = AccountError.wrappedError(error: error, account: account)
|
||||
completion(.failure(wrappedError))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user