mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-06 20:28:48 +00:00
Added error handling for OPML import.
This commit is contained in:
1 parent
64446ec609
commit
2962ccc24b
1 file changed
+9
-1
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user