diff --git a/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml.cs index a0e3754e8..1d2740cd7 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml.cs @@ -27,14 +27,14 @@ namespace Flow.Launcher.Plugin.Program btnAdd.Content = _context.API.GetTranslation("flowlauncher_plugin_program_add"); } - public AddProgramSource(ProgramSource edit, Settings settings) + public AddProgramSource(ProgramSource source, Settings settings) { InitializeComponent(); - _updating = source; + _editing = source; _settings = settings; update = true; - Chkbox.IsChecked = _updating.Enabled; - Directory.Text = _updating.Location; + Chkbox.IsChecked = _editing.Enabled; + Directory.Text = _editing.Location; } private void BrowseButton_Click(object sender, RoutedEventArgs e) @@ -72,8 +72,8 @@ namespace Flow.Launcher.Plugin.Program } else { - _updating.Location = path; - _updating.Enabled = Chkbox.IsChecked ?? true; // Fixme, need to add to disabled source if not custom source + _editing.Location = path; + _editing.Enabled = Chkbox.IsChecked ?? true; // Fixme, need to add to disabled source if not custom source } DialogResult = true; diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 61efbb923..cc368ab4b 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -194,16 +194,24 @@ namespace Flow.Launcher.Plugin.Program { _uwps.First(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier) .Enabled = false; - + var t1 = Task.Run(() => + { + IndexWin32Programs(); + _settings.DisabledProgramSources.Add(new DisabledProgramSource(programToDelete)); + _settings.LastIndexTime = DateTime.Today; + }); } - - if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)) + else if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)) { _win32s.First(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier) .Enabled = false; + var t1 = Task.Run(() => + { + IndexUwpPrograms(); + _settings.DisabledProgramSources.Add(new DisabledProgramSource(programToDelete)); + _settings.LastIndexTime = DateTime.Today; + }); } - - _settings.DisabledProgramSources.Add(new DisabledProgramSource(programToDelete)); } public static void StartProcess(Func runProcess, ProcessStartInfo info)