Merge pull request #552 from taooceros/RemoveEmptyEntryInProgramPlugin

Remove Empty Entries in ProgramSuffixes.xaml.cs
This commit is contained in:
Jeremy Wu 2021-07-05 08:35:53 +10:00 committed by GitHub
commit f47befabcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View file

@ -1,4 +1,5 @@
using System.Windows;
using System;
using System.Windows;
namespace Flow.Launcher.Plugin.Program
{
@ -20,18 +21,21 @@ namespace Flow.Launcher.Plugin.Program
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;
}
}
}
}

View file

@ -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",