From a06a42cccc897d1d754d015a752d037d5c9caaf8 Mon Sep 17 00:00:00 2001 From: Lava <34743145+CanglongCl@users.noreply.github.com> Date: Thu, 25 Jan 2024 16:28:09 -0800 Subject: [PATCH] revert `@Default` in `EasydictApp` --- Easydict/NewApp/EasydictApp.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Easydict/NewApp/EasydictApp.swift b/Easydict/NewApp/EasydictApp.swift index fc0a614fa..76e34acf7 100644 --- a/Easydict/NewApp/EasydictApp.swift +++ b/Easydict/NewApp/EasydictApp.swift @@ -26,9 +26,11 @@ enum EasydictCmpatibilityEntry { struct EasydictApp: App { @NSApplicationDelegateAdaptor private var delegate: AppDelegate - - @Default(.hideMenuBarIcon) - private var hideMenuBar + + // Use `@Default` will cause a purple warning and continuously call `set` of it. + // I'm not sure why. Just leave `AppStorage` here. + @AppStorage(Defaults.Key.hideMenuBarIcon.name) + private var hideMenuBar = Defaults.Key.hideMenuBarIcon.defaultValue private var menuBarImage: String { #if DEBUG