mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix plugin change the result when updating view model
This commit is contained in:
parent
30938f1ce5
commit
26d97a2f68
1 changed files with 5 additions and 2 deletions
|
|
@ -233,8 +233,11 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
var token = e.Token == default ? _updateToken : e.Token;
|
||||
|
||||
PluginManager.UpdatePluginMetadata(e.Results, pair.Metadata, e.Query);
|
||||
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(e.Results, pair.Metadata, e.Query,
|
||||
// make a copy of results to avoid plugin change the result when updating view model
|
||||
var resultsCopy = e.Results.ToList();
|
||||
|
||||
PluginManager.UpdatePluginMetadata(resultsCopy, pair.Metadata, e.Query);
|
||||
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, pair.Metadata, e.Query,
|
||||
token)))
|
||||
{
|
||||
Log.Error("MainViewModel", "Unable to add item to Result Update Queue");
|
||||
|
|
|
|||
Loading…
Reference in a new issue