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" static let defaultThemeName = "Defaults"
@MainActor static let shared = AppDefaults() nonisolated(unsafe) static let shared = AppDefaults()
private init() {} private init() {}
static let store: UserDefaults = { static let store: UserDefaults = {

View File

@ -391,10 +391,12 @@ private extension AppDelegate {
do { do {
try BGTaskScheduler.shared.submit(request) try BGTaskScheduler.shared.submit(request)
} catch { } catch {
Task { @MainActor in
os_log(.error, log: self.log, "Could not schedule app refresh: %@", error.localizedDescription) os_log(.error, log: self.log, "Could not schedule app refresh: %@", error.localizedDescription)
} }
} }
} }
}
/// Performs background feed refresh. /// Performs background feed refresh.
/// - Parameter task: `BGAppRefreshTask` /// - Parameter task: `BGAppRefreshTask`

View File

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