From 62a26ff0ca8e6ef62c47ff6d26e1a4f8fc5302f3 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sun, 4 Feb 2024 11:41:42 -0500 Subject: [PATCH] Move copying to appropiate sections --- Flow.Launcher/ViewModel/MainViewModel.cs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index db481d410..ef533ed31 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -662,19 +662,7 @@ namespace Flow.Launcher.ViewModel if (selected == lastContextMenuResult) { // Use copy to keep the original results unchanged - results = lastContextMenuResults.ConvertAll(result => new Result - { - Title = result.Title, - SubTitle = result.SubTitle, - IcoPath = result.IcoPath, - PluginDirectory = result.PluginDirectory, - Action = result.Action, - ContextData = result.ContextData, - Glyph = result.Glyph, - OriginQuery = result.OriginQuery, - Score = result.Score, - AsyncAction = result.AsyncAction, - }); + results = lastContextMenuResults.ToList(); } else { @@ -689,7 +677,7 @@ namespace Flow.Launcher.ViewModel if (!string.IsNullOrEmpty(query)) { - var filtered = results.Where + var filtered = results.Select(x => x.Clone()).Where ( r => {