mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove SettingsWindowViewModel mentions from CustomShortcutSetting.xaml.cs
This commit is contained in:
parent
61d3758359
commit
ac3c053f88
1 changed files with 2 additions and 6 deletions
|
|
@ -8,7 +8,6 @@ namespace Flow.Launcher
|
|||
{
|
||||
public partial class CustomShortcutSetting : Window
|
||||
{
|
||||
private SettingWindowViewModel viewModel;
|
||||
public string Key { get; set; } = String.Empty;
|
||||
public string Value { get; set; } = String.Empty;
|
||||
private string originalKey { get; init; } = null;
|
||||
|
|
@ -17,13 +16,11 @@ namespace Flow.Launcher
|
|||
|
||||
public CustomShortcutSetting(SettingWindowViewModel vm)
|
||||
{
|
||||
viewModel = vm;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public CustomShortcutSetting(string key, string value, SettingWindowViewModel vm)
|
||||
public CustomShortcutSetting(string key, string value)
|
||||
{
|
||||
viewModel = vm;
|
||||
Key = key;
|
||||
Value = value;
|
||||
originalKey = key;
|
||||
|
|
@ -46,8 +43,7 @@ namespace Flow.Launcher
|
|||
return;
|
||||
}
|
||||
// Check if key is modified or adding a new one
|
||||
if (((update && originalKey != Key) || !update)
|
||||
&& (viewModel?.ShortcutExists(Key) ?? false)) // TODO Remove this check after removing unused code from SettingWindow.xaml.cs
|
||||
if ((update && originalKey != Key) || !update)
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("duplicateShortcut"));
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue