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