mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-19 06:53:26 +08:00
Fix progress bar
Bug introduced in 9962ddf2ed80a00036ebdb2965429675c4355472
This commit is contained in:
parent
e3cdfe27d1
commit
543cd5af80
@ -443,25 +443,19 @@ namespace Wox
|
||||
|
||||
private void TbQuery_OnTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
|
||||
if (_ignoreTextChange) { _ignoreTextChange = false; return; }
|
||||
string query = tbQuery.Text.Trim();
|
||||
|
||||
toolTip.IsOpen = false;
|
||||
if (IsInContextMenuMode)
|
||||
{
|
||||
QueryContextMenu();
|
||||
return;
|
||||
}
|
||||
|
||||
string query = tbQuery.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(query))
|
||||
{
|
||||
Query(query);
|
||||
Dispatcher.DelayInvoke("ShowProgressbar", () =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(query) && query != _lastQuery.RawQuery && !_queryHasReturn)
|
||||
{
|
||||
StartProgress();
|
||||
}
|
||||
}, TimeSpan.FromMilliseconds(150));
|
||||
//reset query history index after user start new query
|
||||
ResetQueryHistoryIndex();
|
||||
}
|
||||
@ -478,6 +472,7 @@ namespace Wox
|
||||
}
|
||||
private void Query(string text)
|
||||
{
|
||||
_queryHasReturn = false;
|
||||
var query = PluginManager.QueryInit(text);
|
||||
if (query != null)
|
||||
{
|
||||
@ -503,6 +498,13 @@ namespace Wox
|
||||
}
|
||||
}
|
||||
_lastQuery = query;
|
||||
Dispatcher.DelayInvoke("ShowProgressbar", () =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(query.RawQuery) && query.RawQuery == _lastQuery.RawQuery && !_queryHasReturn)
|
||||
{
|
||||
StartProgress();
|
||||
}
|
||||
}, TimeSpan.FromMilliseconds(150));
|
||||
PluginManager.QueryForAllPlugins(query);
|
||||
}
|
||||
StopProgress();
|
||||
|
Loading…
Reference in New Issue
Block a user