From ba02da61bdf0ef1061bbf660c5935ac0f87d30bc Mon Sep 17 00:00:00 2001 From: phlpsong Date: Sun, 25 Feb 2024 17:25:34 +0800 Subject: [PATCH] fix: optimize enableBetaNewApp declare --- .../NewApp/Configuration/Configuration+Defaults.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Easydict/NewApp/Configuration/Configuration+Defaults.swift b/Easydict/NewApp/Configuration/Configuration+Defaults.swift index e67ba8c17..35ad8c3ad 100644 --- a/Easydict/NewApp/Configuration/Configuration+Defaults.swift +++ b/Easydict/NewApp/Configuration/Configuration+Defaults.swift @@ -62,10 +62,12 @@ extension Defaults.Keys { static let fontSizeOptionIndex = Key("EZConfiguration_kTranslationControllerFontKey", default: 0) static let selectedMenuBarIcon = Key("EZConfiguration_kSelectedMenuBarIconKey", default: .square) - static let enableBetaNewApp = if #available(macOS 13.0, *) { - Key("EZConfiguration_kEnableBetaNewAppKey", default: true) - } else { - Key("EZConfiguration_kEnableBetaNewAppKey", default: false) + static var enableBetaNewApp: Key { + if #available(macOS 13.0, *) { + Key("EZConfiguration_kEnableBetaNewAppKey", default: true) + } else { + Key("EZConfiguration_kEnableBetaNewAppKey", default: false) + } } }