Show progress while fetching the content of a newly created feed.
This commit is contained in:
parent
13197054bf
commit
3089f2332e
|
@ -254,7 +254,7 @@ final class FeedlyAccountDelegate: AccountDelegate {
|
|||
progress.addToNumberOfTasksAndRemaining(1)
|
||||
|
||||
caller.addFeed(with: resourceId, title: name, toCollectionWith: collectionId) { [weak self] result in
|
||||
progress.completeTask()
|
||||
defer { progress.completeTask() }
|
||||
|
||||
switch result {
|
||||
case .success(let feedlyFeeds):
|
||||
|
@ -276,6 +276,7 @@ final class FeedlyAccountDelegate: AccountDelegate {
|
|||
}
|
||||
|
||||
let group = DispatchGroup()
|
||||
progress.addToNumberOfTasksAndRemaining(1)
|
||||
|
||||
if let self = self {
|
||||
for feed in added {
|
||||
|
@ -299,6 +300,7 @@ final class FeedlyAccountDelegate: AccountDelegate {
|
|||
}
|
||||
|
||||
group.notify(queue: .main) {
|
||||
progress.completeTask()
|
||||
completion(.success(first))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue