mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 08:17:16 +00:00
Use browser agent UA for image and theme downloads. Fixes #4868.
This commit is contained in:
1 parent
8b89354eb5
commit
75755af700
15 files changed
+146
-78
No files matched your search
@@ -61,21 +61,7 @@ extension AppDelegate: AppDelegateAppleEvents {
|
||||
}
|
||||
|
||||
if let themeURL = URL(string: themeURLString) {
|
||||
let request = URLRequest(url: themeURL)
|
||||
let task = URLSession.shared.downloadTask(with: request) { location, _, error in
|
||||
guard let location = location else {
|
||||
return
|
||||
}
|
||||
|
||||
Task { @MainActor in
|
||||
do {
|
||||
try ArticleThemeDownloader.shared.handleFile(at: location)
|
||||
} catch {
|
||||
NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error": error])
|
||||
}
|
||||
}
|
||||
}
|
||||
task.resume()
|
||||
ArticleThemeDownloader.shared.downloadTheme(from: themeURL)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user