mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-03 04:17:44 +01:00
Update to allow all text types for importing OPML and make the error message more friendly. Issue #1443
This commit is contained in:
parent
61c854b031
commit
ed355ad614
@ -318,9 +318,10 @@ extension SettingsViewController: UIDocumentPickerDelegate {
|
||||
switch result {
|
||||
case .success:
|
||||
break
|
||||
case .failure(let error):
|
||||
case .failure:
|
||||
let title = NSLocalizedString("Import Failed", comment: "Import Failed")
|
||||
self.presentError(title: title, message: error.localizedDescription)
|
||||
let message = NSLocalizedString("We were unable to process the selected file. Please ensure that it is a properly formatted OPML file.", comment: "Import Failed Message")
|
||||
self.presentError(title: title, message: message)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -382,7 +383,7 @@ private extension SettingsViewController {
|
||||
}
|
||||
|
||||
func importOPMLDocumentPicker() {
|
||||
let docPicker = UIDocumentPickerViewController(documentTypes: ["public.xml", "org.opml.opml"], in: .import)
|
||||
let docPicker = UIDocumentPickerViewController(documentTypes: ["public.text"], in: .import)
|
||||
docPicker.delegate = self
|
||||
docPicker.modalPresentationStyle = .formSheet
|
||||
self.present(docPicker, animated: true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user