Update iOS to work with the latest Account API

This commit is contained in:
Maurice Parker 2019-05-30 17:41:56 -05:00
parent 0ddb47aa32
commit e7c339fb09

View File

@ -373,22 +373,17 @@ class MasterFeedViewController: ProgressTableViewController, UndoableCommandRunn
}() }()
// Move the Feed // Move the Feed
let source = sourceNode.parent?.representedObject as? Container guard let source = sourceNode.parent?.representedObject as? Container, let destination = destParentNode?.representedObject as? Container else {
let destination = destParentNode?.representedObject as? Container return
source?.removeFeed(feed) { [weak self] result in }
BatchUpdate.shared.start()
source.account?.moveFeed(feed, from: source, to: destination) { result in
switch result { switch result {
case .success: case .success:
destination?.addFeed(feed) { result in BatchUpdate.shared.end()
switch result {
case .success:
break
case .failure(let error):
source?.addFeed(feed) { result in }
self?.presentError(error)
}
}
case .failure(let error): case .failure(let error):
self?.presentError(error) self.presentError(error)
} }
} }