Fix concurrency crash by running code on MainActor that’s supposed to be on MainActor. Fix #4934.

This commit is contained in:
Brent Simmons committed 2026-01-08 21:24:30 -08:00
1 parent 98046b3e62
commit b2c9cb6fd8
2 files changed
+12 -9

No files matched your search

@@ -65,16 +65,17 @@ extension AppDelegate: AppDelegateAppleEvents {
return
}
do {
try ArticleThemeDownloader.shared.handleFile(at: location)
} catch {
NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error": error])
Task { @MainActor in
do {
try ArticleThemeDownloader.shared.handleFile(at: location)
} catch {
NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error": error])
}
}
}
task.resume()
}
return
}
// Special case URL with specific scheme handler x-netnewswire-feed: intended to ensure we open