Fix some concurrency warnings.

This commit is contained in:
Brent Simmons 2024-05-04 11:05:45 -07:00
parent 7f042b5d07
commit 16cebcd60a
3 changed files with 6 additions and 3 deletions

View File

@ -31,7 +31,7 @@ final class AppDefaults {
static let defaultThemeName = "Defaults"
@MainActor static let shared = AppDefaults()
nonisolated(unsafe) static let shared = AppDefaults()
private init() {}
static let store: UserDefaults = {

View File

@ -391,7 +391,9 @@ private extension AppDelegate {
do {
try BGTaskScheduler.shared.submit(request)
} catch {
os_log(.error, log: self.log, "Could not schedule app refresh: %@", error.localizedDescription)
Task { @MainActor in
os_log(.error, log: self.log, "Could not schedule app refresh: %@", error.localizedDescription)
}
}
}
}

View File

@ -17,7 +17,8 @@ import ArticleExtractor
import Images
protocol WebViewControllerDelegate: AnyObject {
func webViewController(_: WebViewController, articleExtractorButtonStateDidUpdate: ArticleExtractorButtonState)
@MainActor func webViewController(_: WebViewController, articleExtractorButtonStateDidUpdate: ArticleExtractorButtonState)
}
final class WebViewController: UIViewController {