Skip to content

Commit f47befa

Browse files
authored
Merge pull request #552 from taooceros/RemoveEmptyEntryInProgramPlugin
Remove Empty Entries in ProgramSuffixes.xaml.cs
2 parents f160f3c + c8d6fa0 commit f47befa

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Windows;
1+
using System;
2+
using System.Windows;
23

34
namespace Flow.Launcher.Plugin.Program
45
{
@@ -20,18 +21,21 @@ public ProgramSuffixes(PluginInitContext context, Settings settings)
2021

2122
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
2223
{
23-
if (string.IsNullOrEmpty(tbSuffixes.Text))
24+
var suffixes = tbSuffixes.Text.Split(Settings.SuffixSeperator, StringSplitOptions.RemoveEmptyEntries);
25+
26+
if (suffixes.Length == 0)
2427
{
2528
string warning = context.API.GetTranslation("flowlauncher_plugin_program_suffixes_cannot_empty");
2629
MessageBox.Show(warning);
2730
return;
2831
}
2932

30-
_settings.ProgramSuffixes = tbSuffixes.Text.Split(Settings.SuffixSeperator);
33+
_settings.ProgramSuffixes = suffixes;
34+
3135
string msg = context.API.GetTranslation("flowlauncher_plugin_program_update_file_suffixes");
3236
MessageBox.Show(msg);
3337

3438
DialogResult = true;
3539
}
3640
}
37-
}
41+
}

Plugins/Flow.Launcher.Plugin.Program/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Name": "Program",
55
"Description": "Search programs in Flow.Launcher",
66
"Author": "qianlifeng",
7-
"Version": "1.5.3",
7+
"Version": "1.5.4",
88
"Language": "csharp",
99
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
1010
"ExecuteFileName": "Flow.Launcher.Plugin.Program.dll",

0 commit comments

Comments
 (0)