Added error handling for OPML import.
This commit is contained in:
parent
64446ec609
commit
2962ccc24b
|
@ -264,7 +264,15 @@ extension SettingsViewController: UIDocumentPickerDelegate {
|
|||
|
||||
func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
|
||||
for url in urls {
|
||||
opmlAccount?.importOPML(url) { result in}
|
||||
opmlAccount?.importOPML(url) { result in
|
||||
switch result {
|
||||
case .success:
|
||||
break
|
||||
case .failure(let error):
|
||||
let title = NSLocalizedString("Import Failed", comment: "Import Failed")
|
||||
self.presentError(title: title, message: error.localizedDescription)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue