mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #702 from Flow-Launcher/PluginHotkeyRequery
Implement Requery option and requery when calling customQueryHotkey
This commit is contained in:
commit
25b4e2bc6a
3 changed files with 12 additions and 9 deletions
|
|
@ -110,7 +110,7 @@ namespace Flow.Launcher.Helper
|
|||
return;
|
||||
|
||||
mainViewModel.MainWindowVisibility = Visibility.Visible;
|
||||
mainViewModel.ChangeQueryText(hotkey.ActionKeyword);
|
||||
mainViewModel.ChangeQueryText(hotkey.ActionKeyword, true);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,12 +48,7 @@ namespace Flow.Launcher
|
|||
|
||||
public void ChangeQuery(string query, bool requery = false)
|
||||
{
|
||||
_mainVM.ChangeQueryText(query);
|
||||
}
|
||||
|
||||
public void ChangeQueryText(string query, bool selectAll = false)
|
||||
{
|
||||
_mainVM.ChangeQueryText(query);
|
||||
_mainVM.ChangeQueryText(query, requery);
|
||||
}
|
||||
|
||||
public void RestartApp()
|
||||
|
|
|
|||
|
|
@ -285,9 +285,17 @@ namespace Flow.Launcher.ViewModel
|
|||
/// but we don't want to move cursor to end when query is updated from TextBox
|
||||
/// </summary>
|
||||
/// <param name="queryText"></param>
|
||||
public void ChangeQueryText(string queryText)
|
||||
public void ChangeQueryText(string queryText, bool reQuery = false)
|
||||
{
|
||||
QueryText = queryText;
|
||||
if (QueryText!=queryText)
|
||||
{
|
||||
// re-query is done in QueryText's setter method
|
||||
QueryText = queryText;
|
||||
}
|
||||
else if (reQuery)
|
||||
{
|
||||
Query();
|
||||
}
|
||||
QueryTextCursorMovedToEnd = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue