mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
fix weird issue
This commit is contained in:
parent
2d805e53bc
commit
b2f7d34a4d
2 changed files with 5 additions and 7 deletions
|
|
@ -223,7 +223,7 @@ namespace Flow.Launcher.ViewModel
|
|||
{
|
||||
if (SelectedIsFromQueryResults())
|
||||
{
|
||||
QueryResults(isReQuery: true, reselect: reselect);
|
||||
QueryResults(isReQuery: true, reSelect: reselect);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -773,7 +773,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
private readonly IReadOnlyList<Result> _emptyResult = new List<Result>();
|
||||
|
||||
private async void QueryResults(bool isReQuery = false, bool reselect = true)
|
||||
private async void QueryResults(bool isReQuery = false, bool reSelect = true)
|
||||
{
|
||||
_updateSource?.Cancel();
|
||||
|
||||
|
|
@ -848,7 +848,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
var tasks = plugins.Select(plugin => plugin.Metadata.Disabled switch
|
||||
{
|
||||
false => QueryTask(plugin),
|
||||
false => QueryTask(plugin, reSelect),
|
||||
true => Task.CompletedTask
|
||||
}).ToArray();
|
||||
|
||||
|
|
@ -876,7 +876,7 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
|
||||
// Local function
|
||||
async Task QueryTask(PluginPair plugin)
|
||||
async Task QueryTask(PluginPair plugin, bool reSelect = true)
|
||||
{
|
||||
// Since it is wrapped within a ThreadPool Thread, the synchronous context is null
|
||||
// Task.Yield will force it to run in ThreadPool
|
||||
|
|
@ -890,7 +890,7 @@ namespace Flow.Launcher.ViewModel
|
|||
results ??= _emptyResult;
|
||||
|
||||
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(results, plugin.Metadata, query,
|
||||
currentCancellationToken, reselect)))
|
||||
currentCancellationToken, reSelect)))
|
||||
{
|
||||
Log.Error("MainViewModel", "Unable to add item to Result Update Queue");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,5 @@ namespace Flow.Launcher.ViewModel
|
|||
bool ReSelectFirstResult = true)
|
||||
{
|
||||
public string ID { get; } = Metadata.ID;
|
||||
|
||||
public bool ReSelectFirstResult { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue