Skip to content

Commit

Permalink
fix: optimize enableBetaNewApp declare
Browse files Browse the repository at this point in the history
  • Loading branch information
phlpsong committed Feb 25, 2024
1 parent 73db0e2 commit ba02da6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Easydict/NewApp/Configuration/Configuration+Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ extension Defaults.Keys {
static let fontSizeOptionIndex = Key<UInt>("EZConfiguration_kTranslationControllerFontKey", default: 0)
static let selectedMenuBarIcon = Key<MenuBarIconType>("EZConfiguration_kSelectedMenuBarIconKey", default: .square)

static let enableBetaNewApp = if #available(macOS 13.0, *) {
Key<Bool>("EZConfiguration_kEnableBetaNewAppKey", default: true)
} else {
Key<Bool>("EZConfiguration_kEnableBetaNewAppKey", default: false)
static var enableBetaNewApp: Key<Bool> {
if #available(macOS 13.0, *) {
Key("EZConfiguration_kEnableBetaNewAppKey", default: true)
} else {
Key("EZConfiguration_kEnableBetaNewAppKey", default: false)
}
}
}

Expand Down

0 comments on commit ba02da6

Please sign in to comment.