From 47ef9bc51ce7bf5bee495acec1b23febf4dde1cf Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 26 Oct 2026 14:31:16 -0700 Subject: [PATCH] =?UTF-8?q?Stop=20using=20enum=20type=20as=20notification?= =?UTF-8?q?=20object,=20since=20that=20won=E2=80=99t=20work.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Shared/AppDefaults.swift | 2 +- iOS/AppDefaults+iOS.swift | 2 +- iOS/SceneDelegate.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Shared/AppDefaults.swift b/Shared/AppDefaults.swift index abf790b4a..f20392a88 100644 --- a/Shared/AppDefaults.swift +++ b/Shared/AppDefaults.swift @@ -114,7 +114,7 @@ enum AppDefaults { } set { UserDefaults.standard.set(newValue.rawValue, forKey: Key.unreadCountDisplay) - NotificationCenter.default.post(name: .unreadCountDisplaySettingDidChange, object: self) + NotificationCenter.default.post(name: .unreadCountDisplaySettingDidChange, object: nil) } } diff --git a/iOS/AppDefaults+iOS.swift b/iOS/AppDefaults+iOS.swift index ea625abe7..af4bc577d 100644 --- a/iOS/AppDefaults+iOS.swift +++ b/iOS/AppDefaults+iOS.swift @@ -78,7 +78,7 @@ extension AppDefaults { } set { UserDefaults.standard.set(newValue.rawValue, forKey: Key.userInterfaceColorPalette) - NotificationCenter.default.post(name: .userInterfaceColorPaletteDidUpdate, object: self) + NotificationCenter.default.post(name: .userInterfaceColorPaletteDidUpdate, object: nil) } } diff --git a/iOS/SceneDelegate.swift b/iOS/SceneDelegate.swift index 09ccc96b8..ae10a9771 100644 --- a/iOS/SceneDelegate.swift +++ b/iOS/SceneDelegate.swift @@ -49,7 +49,7 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate { updateUserInterfaceStyle() - NotificationCenter.default.addObserver(self, selector: #selector(handleUserInterfaceColorPaletteDidUpdate(_:)), name: .userInterfaceColorPaletteDidUpdate, object: AppDefaults.self) + NotificationCenter.default.addObserver(self, selector: #selector(handleUserInterfaceColorPaletteDidUpdate(_:)), name: .userInterfaceColorPaletteDidUpdate, object: nil) if connectionOptions.urlContexts.first?.url != nil { self.scene(scene, openURLContexts: connectionOptions.urlContexts)