Skip to content

Commit

Permalink
revert @Default in EasydictApp
Browse files Browse the repository at this point in the history
  • Loading branch information
CanglongCl committed Jan 26, 2024
1 parent 5cf9365 commit a06a42c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Easydict/NewApp/EasydictApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Bool>.hideMenuBarIcon.name)
private var hideMenuBar = Defaults.Key<Bool>.hideMenuBarIcon.defaultValue

private var menuBarImage: String {
#if DEBUG
Expand Down

0 comments on commit a06a42c

Please sign in to comment.