From ac3c053f88edadec9fc88db2dfb83bf7ae83f04d Mon Sep 17 00:00:00 2001 From: Yusyuriv Date: Sun, 19 May 2024 05:51:05 +0600 Subject: [PATCH] Remove SettingsWindowViewModel mentions from CustomShortcutSetting.xaml.cs --- Flow.Launcher/CustomShortcutSetting.xaml.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher/CustomShortcutSetting.xaml.cs b/Flow.Launcher/CustomShortcutSetting.xaml.cs index 880c49787..82efb4869 100644 --- a/Flow.Launcher/CustomShortcutSetting.xaml.cs +++ b/Flow.Launcher/CustomShortcutSetting.xaml.cs @@ -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;