Correctly clear the progress bar for not found feeds and already subscribed feeds
This commit is contained in:
parent
640aaa9623
commit
b9b68bb48c
|
@ -673,14 +673,14 @@ private extension CloudKitAccountDelegate {
|
||||||
case .success(let feedSpecifiers):
|
case .success(let feedSpecifiers):
|
||||||
guard let bestFeedSpecifier = FeedSpecifier.bestFeed(in: feedSpecifiers), let url = URL(string: bestFeedSpecifier.urlString) else {
|
guard let bestFeedSpecifier = FeedSpecifier.bestFeed(in: feedSpecifiers), let url = URL(string: bestFeedSpecifier.urlString) else {
|
||||||
BatchUpdate.shared.end()
|
BatchUpdate.shared.end()
|
||||||
self.refreshProgress.completeTasks(5)
|
self.refreshProgress.completeTasks(4)
|
||||||
completion(.failure(AccountError.createErrorNotFound))
|
completion(.failure(AccountError.createErrorNotFound))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if account.hasWebFeed(withURL: bestFeedSpecifier.urlString) {
|
if account.hasWebFeed(withURL: bestFeedSpecifier.urlString) {
|
||||||
BatchUpdate.shared.end()
|
BatchUpdate.shared.end()
|
||||||
self.refreshProgress.completeTasks(5)
|
self.refreshProgress.completeTasks(4)
|
||||||
completion(.failure(AccountError.createErrorAlreadySubscribed))
|
completion(.failure(AccountError.createErrorAlreadySubscribed))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue