diff --git a/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml.cs index d9ea3ad97d1..6b1f072f13d 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml.cs @@ -1,4 +1,5 @@ -using System.Windows; +using System; +using System.Windows; namespace Flow.Launcher.Plugin.Program { @@ -20,18 +21,21 @@ public ProgramSuffixes(PluginInitContext context, Settings settings) private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { - if (string.IsNullOrEmpty(tbSuffixes.Text)) + var suffixes = tbSuffixes.Text.Split(Settings.SuffixSeperator, StringSplitOptions.RemoveEmptyEntries); + + if (suffixes.Length == 0) { string warning = context.API.GetTranslation("flowlauncher_plugin_program_suffixes_cannot_empty"); MessageBox.Show(warning); return; } - _settings.ProgramSuffixes = tbSuffixes.Text.Split(Settings.SuffixSeperator); + _settings.ProgramSuffixes = suffixes; + string msg = context.API.GetTranslation("flowlauncher_plugin_program_update_file_suffixes"); MessageBox.Show(msg); DialogResult = true; } } -} +} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.Program/plugin.json b/Plugins/Flow.Launcher.Plugin.Program/plugin.json index fe7a3415dba..a37075b0c77 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Program/plugin.json @@ -4,7 +4,7 @@ "Name": "Program", "Description": "Search programs in Flow.Launcher", "Author": "qianlifeng", - "Version": "1.5.3", + "Version": "1.5.4", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Program.dll",