mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove Empty Entries for ProgramSuffixes.xaml.cs
This commit is contained in:
parent
d6ec4b51d5
commit
604699f884
1 changed files with 8 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue