Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Sources/CodexBar/StatusItemController+Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ extension StatusItemController {
let switcherUsageBarsShowUsedMatch = self.settings.usageBarsShowUsed == self.lastSwitcherUsageBarsShowUsed
let switcherSelectionMatches = switcherSelection == self.lastMergedSwitcherSelection
let switcherOverviewAvailabilityMatches = includesOverview == self.lastSwitcherIncludesOverview
let tokenSwitcherCompatible = tokenAccountDisplay == nil && !hasTokenSwitcher
let tokenSwitcherCompatible = (tokenAccountDisplay?.showSwitcher == true) == hasTokenSwitcher
let codexSwitcherCompatible = codexAccountDisplay == self.lastCodexAccountMenuDisplay &&
((codexAccountDisplay?.showSwitcher == true && hasCodexSwitcher) ||
(codexAccountDisplay?.showSwitcher != true && !hasCodexSwitcher))
Expand Down Expand Up @@ -292,6 +292,8 @@ extension StatusItemController {
self.menuLogger.debug("populateMenu(open): rebuilding whole menu and replacing provider switcher")
}
#endif
CATransaction.begin()
CATransaction.setDisableActions(true)
menu.removeAllItems()
self.addProviderSwitcherIfNeeded(
to: menu,
Expand Down Expand Up @@ -321,6 +323,7 @@ extension StatusItemController {
context: menuContext,
switcherSelection: switcherSelection ?? .provider(currentProvider))
self.addActionableSections(descriptor.sections, to: menu, width: menuWidth)
CATransaction.commit()
}

private func reusableFixedWidthRows(in menu: NSMenu) -> [NSMenuItem] {
Expand Down