From 8a4ff3bada821100b7032f1b2810f8dfcdae8b35 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 24 Oct 2022 23:16:09 +0800 Subject: [PATCH] use shallow copy --- Plugins/Flow.Launcher.Plugin.Program/Settings.cs | 2 +- .../Views/Commands/ProgramSettingDisplay.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs index af5b7bc7d..3afb499f5 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs @@ -9,7 +9,7 @@ namespace Flow.Launcher.Plugin.Program { public DateTime LastIndexTime { get; set; } public List ProgramSources { get; set; } = new List(); - public List DisabledProgramSources { get; set; } = new List(); + public List DisabledProgramSources { get; set; } = new List(); // For disabled single programs public string[] ProgramSuffixes { get; set; } = {"appref-ms", "exe", "lnk"}; public bool EnableStartMenuSource { get; set; } = true; diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/Commands/ProgramSettingDisplay.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/Commands/ProgramSettingDisplay.cs index 06e72176d..6fb6ce8f4 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/Commands/ProgramSettingDisplay.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/Commands/ProgramSettingDisplay.cs @@ -11,9 +11,7 @@ namespace Flow.Launcher.Plugin.Program.Views.Commands { internal static List LoadProgramSources(this List programSources) { - var list = new List(); - - programSources.ForEach(x => list.Add(new ProgramSource(x))); + var list = new List(programSources); // Even though these are disabled, we still want to display them so users can enable later on Main._settings