mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-03 10:47:21 +00:00
Fix crashing bug (concurrency) observing UserDefaults did change notifications.
This commit is contained in:
1 parent
00350ddac8
commit
d3982ce1da
1 file changed
+7
-1
@@ -145,7 +145,13 @@ final class WebViewController: UIViewController {
|
||||
loadWebView()
|
||||
}
|
||||
|
||||
@objc func handleUserDefaultsDidChange(_ note: Notification) {
|
||||
@objc nonisolated func handleUserDefaultsDidChange(_ note: Notification) {
|
||||
Task { @MainActor in
|
||||
self.userDefaultsDidChange()
|
||||
}
|
||||
}
|
||||
|
||||
private func userDefaultsDidChange() {
|
||||
guard isArticleContentJavascriptEnabled != AppDefaults.shared.isArticleContentJavascriptEnabled else {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user