mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
adjusted context menu call to exit early when history result selected
This commit is contained in:
parent
5c241d7491
commit
4ddb164bbd
1 changed files with 6 additions and 6 deletions
|
|
@ -429,16 +429,17 @@ namespace Flow.Launcher.ViewModel
|
|||
return;
|
||||
}
|
||||
|
||||
// Do not show context menu for history results, they will have no PluginID set.
|
||||
if (string.IsNullOrEmpty(SelectedResults.SelectedItem?.Result?.PluginID))
|
||||
return;
|
||||
|
||||
// For query mode, we load context menu
|
||||
if (QueryResultsSelected())
|
||||
{
|
||||
// When switch to ContextMenu from QueryResults, but no item being chosen, should do nothing
|
||||
// i.e. Shift+Enter/Ctrl+O right after Alt + Space should do nothing
|
||||
if (SelectedResults.SelectedItem?.Result != null &&
|
||||
!string.IsNullOrEmpty(SelectedResults.SelectedItem.Result.PluginID)) // Do not show context menu for history items
|
||||
{
|
||||
if (SelectedResults.SelectedItem?.Result != null)
|
||||
SelectedResults = ContextMenu;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1260,8 +1261,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
var selected = Results.SelectedItem?.Result;
|
||||
|
||||
if (selected != null && // SelectedItem returns null if selection is empty.
|
||||
!string.IsNullOrEmpty(selected.PluginID)) // SelectedItem must have a valid PluginID
|
||||
if (selected != null) // SelectedItem returns null if selection is empty.
|
||||
{
|
||||
List<Result> results = PluginManager.GetContextMenusForPlugin(selected);
|
||||
results.Add(ContextMenuTopMost(selected));
|
||||
|
|
|
|||
Loading…
Reference in a new issue