mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-03 13:32:16 +08:00
Rebuilding the tray menu for every state change re-creates every item even when only checkmarks, delay texts or the selected node moved. Keep handles into the attached menu and, inside the same main-thread dispatch, mutate items in place. A signature over topology inputs (display mode, inline flags, mode, language, hotkeys, profile list) gates a full rebuild, and a proxy-only signature change swaps just the group submenus under the persisted Proxies submenu. State-only updates (mode/system proxy/TUN/lightweight switches, profile selection, node selection, delay texts) no longer reconstruct the menu; structural changes still rebuild exactly as before.