more indentation

This commit is contained in:
Dave Marquard 2021-07-19 13:16:26 -07:00
parent 0c5917b4a2
commit 17759255e7
No known key found for this signature in database
GPG Key ID: 46E688C4973F5C88
1 changed files with 21 additions and 17 deletions

View File

@ -473,23 +473,27 @@ final class ReaderAPIAccountDelegate: AccountDelegate {
if from is Account {
addWebFeed(for: account, with: feed, to: to, completion: completion)
} else {
guard let subscriptionId = feed.externalID, let fromTag = (from as? Folder)?.name, let toTag = (to as? Folder)?.name else {
completion(.failure(ReaderAPIAccountDelegateError.invalidParameter))
return
}
refreshProgress.addToNumberOfTasksAndRemaining(1)
caller.moveSubscription(subscriptionID: subscriptionId, fromTag: fromTag, toTag: toTag) { result in
self.refreshProgress.completeTask()
switch result {
case .success:
from.removeWebFeed(feed)
to.addWebFeed(feed)
completion(.success(()))
case .failure(let error):
completion(.failure(error))
}
}
guard
let subscriptionId = feed.externalID,
let fromTag = (from as? Folder)?.name,
let toTag = (to as? Folder)?.name
else {
completion(.failure(ReaderAPIAccountDelegateError.invalidParameter))
return
}
refreshProgress.addToNumberOfTasksAndRemaining(1)
caller.moveSubscription(subscriptionID: subscriptionId, fromTag: fromTag, toTag: toTag) { result in
self.refreshProgress.completeTask()
switch result {
case .success:
from.removeWebFeed(feed)
to.addWebFeed(feed)
completion(.success(()))
case .failure(let error):
completion(.failure(error))
}
}
}
}