client/tree context menu: improve handling the case when the note color picker is not available

This commit is contained in:
Adorian Doran 2025-11-22 13:35:36 +02:00
parent b4b1b7a3fa
commit beb7d09aee

View File

@ -244,16 +244,12 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Tree
{ kind: "separator"}, { kind: "separator"},
{ (notOptionsOrHelp && selectedNotes.length === 1) ? {
kind: "custom", kind: "custom",
componentFn: () => { componentFn: () => {
if (notOptionsOrHelp && selectedNotes.length === 1) { return NoteColorPicker({note});
return NoteColorPicker({note});
} else {
return null;
}
} }
}, } : null,
{ kind: "separator" }, { kind: "separator" },