mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-01 05:57:09 -06:00
MENU-BAR: merge the native menu's identical quit/about/settings branches (clippy::if_same_then_else)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
77c0a6adfa
commit
87bba4ec28
@@ -489,9 +489,7 @@ impl NativeMenu {
|
||||
// events never reach `shortcuts::handle`, so this is the one guard for AppKit's
|
||||
// accelerators and clicks: while the blocking library window or a quit/settings notice
|
||||
// owns input, a queued command is dropped (Quit stays for the existing confirmation).
|
||||
let (cmd, params) = if key == QUIT {
|
||||
(key, serde_json::json!({}))
|
||||
} else if key == "app.about" || key == SETTINGS {
|
||||
let (cmd, params) = if key == QUIT || key == "app.about" || key == SETTINGS {
|
||||
(key, serde_json::json!({}))
|
||||
} else if let Some(it) = self.items.get(&key) {
|
||||
(it.cmd.clone(), it.params.clone())
|
||||
|
||||
Reference in New Issue
Block a user