File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,14 @@ private void UpdateContextItems()
9696
9797 SecondaryCommand = SelectedItem . SecondaryCommand ;
9898
99- ShouldShowContextMenu = SelectedItem . MoreCommands
100- . OfType < CommandContextItemViewModel > ( )
101- . Count ( ) > 1 ;
99+ var hasMoreThanOneContextItem = SelectedItem . MoreCommands . Count ( ) > 1 ;
100+ var hasMoreThanOneCommand = SelectedItem . MoreCommands . OfType < CommandContextItemViewModel > ( ) . Any ( ) ;
101+
102+ // ShouldShowContextMenu = SelectedItem.MoreCommands
103+
104+ // // .OfType<CommandContextItemViewModel>()
105+ // .Count() > 1;
106+ ShouldShowContextMenu = hasMoreThanOneContextItem && hasMoreThanOneCommand ;
102107
103108 OnPropertyChanged ( nameof ( HasSecondaryCommand ) ) ;
104109 OnPropertyChanged ( nameof ( SecondaryCommand ) ) ;
You can’t perform that action at this time.
0 commit comments