Various ThemeDownloader Updates

- `try` added where applicable to ArticleTheme inits
- `ArticleThemePlist` has fixed spelling of theme identifier and conforms to Equatable
- `ArticleTheme` now uses `ArticleThemePlist`
-  `ArticleThemeDownloader` is now a class
- `ArticleThemeDownloader` will now download themes to Application Support/NetNewsWire/Downloads on macOS and iOS.
- `ArticleThemeDownloader` will remove downloaded themes from the Download folder when the application is closed.
- macOS app delegate now observes for theme download fails
- Error display code moved from SceneDelegate to SceneCoordinator so that it can use existing presentError on rootVC.
This commit is contained in:
Stuart Breckenridge
2021-09-21 09:10:56 +08:00
parent 7986e1caee
commit 78e0595708
11 changed files with 130 additions and 89 deletions

View File

@@ -112,7 +112,7 @@ extension ArticleThemesTableViewController: UIDocumentPickerDelegate {
func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
guard let url = urls.first else { return }
ArticleThemeImporter.importTheme(controller: self, filename: url.standardizedFileURL.path)
try? ArticleThemeImporter.importTheme(controller: self, filename: url.standardizedFileURL.path)
}
}