ReQuery method overloading, reselect flag.

This commit is contained in:
AminSallah 2024-02-25 04:05:54 +02:00 committed by GitHub
parent 50f71c0731
commit e722927d9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,6 +33,7 @@ namespace Flow.Launcher.ViewModel
#region Private Fields
private bool _isQueryRunning;
private bool _reselect = true;
private Query _lastQuery;
private Result lastContextMenuResult = new Result();
private List<Result> lastContextMenuResults = new List<Result>();
@ -216,6 +217,15 @@ namespace Flow.Launcher.ViewModel
}
}
public void ReQuery(bool reselect)
{
if (SelectedIsFromQueryResults())
{
_reselect = reselect;
QueryResults(isReQuery: true);
}
}
[RelayCommand]
private void LoadContextMenu()
{
@ -1151,7 +1161,8 @@ namespace Flow.Launcher.ViewModel
}
}
Results.AddResults(resultsForUpdates, token);
Results.AddResults(resultsForUpdates, token, _reselect);
_reselect = true;
}
#endregion