mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Convert moveFeed to async await.
This commit is contained in:
@@ -104,12 +104,14 @@ extension SidebarViewController: UITableViewDropDelegate {
|
||||
guard sourceContainer !== destinationContainer else { return }
|
||||
|
||||
BatchUpdate.shared.start()
|
||||
sourceContainer.account?.moveFeed(feed, from: sourceContainer, to: destinationContainer) { result in
|
||||
BatchUpdate.shared.end()
|
||||
switch result {
|
||||
case .success:
|
||||
break
|
||||
case .failure(let error):
|
||||
|
||||
Task { @MainActor in
|
||||
|
||||
do {
|
||||
try await sourceContainer.account?.moveFeed(feed, from: sourceContainer, to: destinationContainer)
|
||||
BatchUpdate.shared.end()
|
||||
} catch {
|
||||
BatchUpdate.shared.end()
|
||||
self.presentError(error)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user