Skip to content

Commit

Permalink
add a condition check before adding the status item
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverAgain11 committed Nov 28, 2023
1 parent f4a61ba commit f0eb067
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Easydict/Feature/StatusItem/EZMenuItemManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#import "EZShortcut.h"
#import <SSZipArchive/SSZipArchive.h>
#import "EZRightClickDetector.h"
#import "EZConfiguration.h"

static CGFloat const kImageMenuItemHeightRatio = 1.4;
static CGFloat const kTitleMenuItemHeightRatio = 1.2;
Expand Down Expand Up @@ -71,6 +72,9 @@ - (void)setup {
if (self.statusItem) {
return;
}
if (EZConfiguration.shared.hideMenuBarIcon) {
return;
}

NSStatusItem *statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength];
[statusItem setMenu:self.menu];
Expand Down

0 comments on commit f0eb067

Please sign in to comment.