[CmdPal] Hide commands that shouldn't be visible (#39011)

hide commands from more commands
This commit is contained in:
Davide Giacometti
2025-04-23 11:30:36 +02:00
committed by GitHub
parent 4be6129835
commit 252cf2670f

View File

@@ -109,7 +109,7 @@ public partial class CommandBarViewModel : ObservableObject,
if (SelectedItem.MoreCommands.Count() > 1) if (SelectedItem.MoreCommands.Count() > 1)
{ {
ShouldShowContextMenu = true; ShouldShowContextMenu = true;
ContextCommands = [.. SelectedItem.AllCommands]; ContextCommands = [.. SelectedItem.AllCommands.Where(c => c.ShouldBeVisible)];
} }
else else
{ {