Skip to content

Commit

Permalink
fix: dont fire events for about menu item (#237)
Browse files Browse the repository at this point in the history
closes #215
  • Loading branch information
amrbashir authored Oct 29, 2024
1 parent cea276a commit 3b58a2e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changes/about-macos-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"muda": "patch"
---

Fix `PredefinedMenuItem::about` sending events where it shouldn't.
12 changes: 6 additions & 6 deletions src/platform_impl/macos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1036,14 +1036,14 @@ impl MenuItem {
};
}
}
}
} else {
if item.item_type == MenuItemType::Check {
item.set_checked(!item.is_checked());
}

if item.item_type == MenuItemType::Check {
item.set_checked(!item.is_checked());
let id = (*item).id().clone();
MenuEvent::send(crate::MenuEvent { id });
}

let id = (*item).id().clone();
MenuEvent::send(crate::MenuEvent { id });
}

fn create(
Expand Down

0 comments on commit 3b58a2e

Please sign in to comment.