mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
Plugins: Hide note list menu items for commands that are disabled (#5270)
This commit is contained in:
parent
d2e2866995
commit
e7260d7498
@ -191,9 +191,11 @@ export default class NoteListUtils {
|
||||
const location = info.view.location;
|
||||
if (location !== MenuItemLocation.Context && location !== MenuItemLocation.NoteListContextMenu) continue;
|
||||
|
||||
menu.append(
|
||||
new MenuItem(menuUtils.commandToStatefulMenuItem(info.view.commandName, noteIds))
|
||||
);
|
||||
if (cmdService.isEnabled(info.view.commandName)) {
|
||||
menu.append(
|
||||
new MenuItem(menuUtils.commandToStatefulMenuItem(info.view.commandName, noteIds))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return menu;
|
||||
|
Loading…
Reference in New Issue
Block a user