Skip to content

Commit

Permalink
add a condition check before adding the status item (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverAgain11 authored and tisfeng committed Dec 3, 2023
1 parent 4ca3cc0 commit 2a49402
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 2a49402

Please sign in to comment.