Skip to content

Commit ac3c053

Browse files
committed
Remove SettingsWindowViewModel mentions from CustomShortcutSetting.xaml.cs
1 parent 61d3758 commit ac3c053

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Flow.Launcher/CustomShortcutSetting.xaml.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ namespace Flow.Launcher
88
{
99
public partial class CustomShortcutSetting : Window
1010
{
11-
private SettingWindowViewModel viewModel;
1211
public string Key { get; set; } = String.Empty;
1312
public string Value { get; set; } = String.Empty;
1413
private string originalKey { get; init; } = null;
@@ -17,13 +16,11 @@ public partial class CustomShortcutSetting : Window
1716

1817
public CustomShortcutSetting(SettingWindowViewModel vm)
1918
{
20-
viewModel = vm;
2119
InitializeComponent();
2220
}
2321

24-
public CustomShortcutSetting(string key, string value, SettingWindowViewModel vm)
22+
public CustomShortcutSetting(string key, string value)
2523
{
26-
viewModel = vm;
2724
Key = key;
2825
Value = value;
2926
originalKey = key;
@@ -46,8 +43,7 @@ private void BtnAdd_OnClick(object sender, RoutedEventArgs e)
4643
return;
4744
}
4845
// Check if key is modified or adding a new one
49-
if (((update && originalKey != Key) || !update)
50-
&& (viewModel?.ShortcutExists(Key) ?? false)) // TODO Remove this check after removing unused code from SettingWindow.xaml.cs
46+
if ((update && originalKey != Key) || !update)
5147
{
5248
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("duplicateShortcut"));
5349
return;

0 commit comments

Comments
 (0)