From 67655d15cc403c2782842a8538aa419c0a02fd05 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 25 Aug 2019 17:40:59 +1000 Subject: [PATCH] Add reindex when updating plugin.program suffix --- Plugins/Wox.Plugin.Program/ProgramSetting.xaml.cs | 7 +++++-- Plugins/Wox.Plugin.Program/ProgramSuffixes.xaml.cs | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Plugins/Wox.Plugin.Program/ProgramSetting.xaml.cs b/Plugins/Wox.Plugin.Program/ProgramSetting.xaml.cs index e6ad4106bf..c69de7edab 100644 --- a/Plugins/Wox.Plugin.Program/ProgramSetting.xaml.cs +++ b/Plugins/Wox.Plugin.Program/ProgramSetting.xaml.cs @@ -94,8 +94,11 @@ namespace Wox.Plugin.Program private void BtnProgramSuffixes_OnClick(object sender, RoutedEventArgs e) { - ProgramSuffixes p = new ProgramSuffixes(context, _settings); - p.ShowDialog(); + var p = new ProgramSuffixes(context, _settings); + if (p.ShowDialog() ?? false) + { + ReIndexing(); + } } private void programSourceView_DragEnter(object sender, DragEventArgs e) diff --git a/Plugins/Wox.Plugin.Program/ProgramSuffixes.xaml.cs b/Plugins/Wox.Plugin.Program/ProgramSuffixes.xaml.cs index 6f52bacd0d..ef5783b469 100644 --- a/Plugins/Wox.Plugin.Program/ProgramSuffixes.xaml.cs +++ b/Plugins/Wox.Plugin.Program/ProgramSuffixes.xaml.cs @@ -30,6 +30,8 @@ namespace Wox.Plugin.Program _settings.ProgramSuffixes = tbSuffixes.Text.Split(Settings.SuffixSeperator); string msg = context.API.GetTranslation("wox_plugin_program_update_file_suffixes"); MessageBox.Show(msg); + + DialogResult = true; } } }