diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 8376fd07b..07fc378c3 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -17,7 +17,8 @@ namespace Flow.Launcher.Plugin
public interface IPublicAPI
{
///
- /// Change Flow.Launcher query
+ /// Change Flow.Launcher query.
+ /// When current results are from context menu or history, it will go back to query results before changing query.
///
/// query text
///
@@ -299,7 +300,7 @@ namespace Flow.Launcher.Plugin
///
/// Reloads the query.
- /// This method should run when selected item is from query results.
+ /// When current results are from context menu or history, it will go back to query results before requerying.
///
/// Choose the first result after reload if true; keep the last selected result if false. Default is true.
public void ReQuery(bool reselect = true);
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index a9809a49a..dc1fb6f15 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -279,10 +279,8 @@ namespace Flow.Launcher.ViewModel
public void ReQuery(bool reselect)
{
- if (SelectedIsFromQueryResults())
- {
- QueryResults(isReQuery: true, reSelect: reselect);
- }
+ BackToQueryResults();
+ QueryResults(isReQuery: true, reSelect: reselect);
}
[RelayCommand]
@@ -626,6 +624,8 @@ namespace Flow.Launcher.ViewModel
{
Application.Current.Dispatcher.Invoke(() =>
{
+ BackToQueryResults();
+
if (QueryText != queryText)
{
// re-query is done in QueryText's setter method
@@ -1291,7 +1291,6 @@ namespace Flow.Launcher.ViewModel
{
_topMostRecord.Remove(result);
App.API.ShowMsg(InternationalizationManager.Instance.GetTranslation("success"));
- App.API.BackToQueryResults();
App.API.ReQuery();
return false;
}
@@ -1309,7 +1308,6 @@ namespace Flow.Launcher.ViewModel
{
_topMostRecord.AddOrUpdate(result);
App.API.ShowMsg(InternationalizationManager.Instance.GetTranslation("success"));
- App.API.BackToQueryResults();
App.API.ReQuery();
return false;
}
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index a46b98d64..bae9292bf 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -159,5 +159,4 @@ namespace Flow.Launcher.ViewModel
changeKeywordsWindow.ShowDialog();
}
}
-
}
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs
index 17e9fe2bc..482e821dc 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs
@@ -59,7 +59,6 @@ namespace Flow.Launcher.Plugin.PluginsManager
var link = pluginManifestInfo.UrlSourceCode.StartsWith("https://github.com")
? Regex.Replace(pluginManifestInfo.UrlSourceCode, @"\/tree\/\w+$", "") + "/issues"
: pluginManifestInfo.UrlSourceCode;
-
Context.API.OpenUrl(link);
return true;
}
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index 65af0b56c..b3763aaa6 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -292,7 +292,6 @@ namespace Flow.Launcher.Plugin.Program
Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"),
Context.API.GetTranslation(
"flowlauncher_plugin_program_disable_dlgtitle_success_message"));
- Context.API.BackToQueryResults();
Context.API.ReQuery();
return false;
},
diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
index 7f1f4bd4d..53479b81f 100644
--- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
@@ -5,7 +5,6 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
-using System.Windows;
using WindowsInput;
using WindowsInput.Native;
using Flow.Launcher.Infrastructure.Hotkey;
@@ -379,7 +378,7 @@ namespace Flow.Launcher.Plugin.Shell
private void OnWinRPressed()
{
// show the main window and set focus to the query box
- Task.Run(() =>
+ _ = Task.Run(() =>
{
context.API.ShowMainWindow();
context.API.ChangeQuery($"{context.CurrentPluginMetadata.ActionKeywords[0]}{Plugin.Query.TermSeparator}");