Call correct account function to add folders

This commit is contained in:
Maurice Parker 2019-09-27 08:46:25 -05:00
parent 6536dbf2a5
commit 401f791779
1 changed files with 8 additions and 2 deletions

View File

@ -56,9 +56,15 @@ class AddFolderViewController: UITableViewController, AddContainerViewController
func add() {
let account = accounts[accountPickerView.selectedRow(inComponent: 0)]
if let folderName = nameTextField.text {
account.ensureFolder(with: folderName)
account.addFolder(folderName) { result in
switch result {
case .success:
self.delegate?.processingDidEnd()
case .failure(let error):
self.presentError(error)
}
}
}
delegate?.processingDidEnd()
}
@objc func textDidChange(_ note: Notification) {