mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-07 22:44:16 +00:00
fix(macos): remove self-delegate on cost usage submenu to prevent recursive dropdown
The cost usage submenu set `menu.delegate = self` (the MenuSessionsInjector), which caused `menuWillOpen(_:)` to call `inject(into:)` on the submenu when it opened. This re-inserted the "Usage cost (30 days)" item into the submenu, creating an infinite recursive dropdown. Fix: remove the delegate assignment from the submenu — it does not need the injector's delegate behavior since it only contains a static chart view. Closes #25167 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Peter Steinberger
parent
2bad30b4d3
commit
96b21f4823
@@ -493,7 +493,6 @@ extension MenuSessionsInjector {
|
||||
guard !summary.daily.isEmpty else { return nil }
|
||||
|
||||
let menu = NSMenu()
|
||||
menu.delegate = self
|
||||
|
||||
let chartView = CostUsageHistoryMenuView(summary: summary, width: width)
|
||||
let hosting = NSHostingView(rootView: AnyView(chartView))
|
||||
|
||||
Reference in New Issue
Block a user