Rename Settings.ShortCuts to CustomShortcuts

This commit is contained in:
Vic 2022-10-05 20:08:14 +08:00
parent 3d20a602df
commit 099b1d6ed1
4 changed files with 6 additions and 6 deletions

View file

@ -204,7 +204,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
// This needs to be loaded last by staying at the bottom // This needs to be loaded last by staying at the bottom
public PluginsSettings PluginSettings { get; set; } = new PluginsSettings(); public PluginsSettings PluginSettings { get; set; } = new PluginsSettings();
internal ObservableCollection<CustomShortcutModel> ShortCuts { get; set; } = new(); internal ObservableCollection<CustomShortcutModel> CustomShortcuts { get; set; } = new();
} }
public enum LastQueryMode public enum LastQueryMode

View file

@ -386,7 +386,7 @@ namespace Flow.Launcher
MessageBox.Show(deleteWarning, InternationalizationManager.Instance.GetTranslation("delete"), MessageBox.Show(deleteWarning, InternationalizationManager.Instance.GetTranslation("delete"),
MessageBoxButton.YesNo) == MessageBoxResult.Yes) MessageBoxButton.YesNo) == MessageBoxResult.Yes)
{ {
settings.ShortCuts.Remove(item.Value); settings.CustomShortcuts.Remove(item.Value);
} }
} }
private void OnEditCustomShortCutClick(object sender, RoutedEventArgs e) private void OnEditCustomShortCutClick(object sender, RoutedEventArgs e)
@ -397,7 +397,7 @@ namespace Flow.Launcher
var shortcutSettingWindow = new CustomShortcutSetting(item.Value); var shortcutSettingWindow = new CustomShortcutSetting(item.Value);
if (shortcutSettingWindow.ShowDialog() == true) if (shortcutSettingWindow.ShowDialog() == true)
{ {
settings.ShortCuts[viewModel.SelectCustomShortcutIndex.Value] = shortcutSettingWindow.ShortCut; settings.CustomShortcuts[viewModel.SelectCustomShortcutIndex.Value] = shortcutSettingWindow.ShortCut;
} }
} }
else else
@ -411,7 +411,7 @@ namespace Flow.Launcher
var shortcutSettingWindow = new CustomShortcutSetting(); var shortcutSettingWindow = new CustomShortcutSetting();
if (shortcutSettingWindow.ShowDialog() == true) if (shortcutSettingWindow.ShowDialog() == true)
{ {
settings.ShortCuts.Add(shortcutSettingWindow.ShortCut); settings.CustomShortcuts.Add(shortcutSettingWindow.ShortCut);
} }
} }
} }

View file

@ -554,7 +554,7 @@ namespace Flow.Launcher.ViewModel
return; return;
} }
var query = ConstructQuery(QueryText, _settings.ShortCuts); var query = ConstructQuery(QueryText, _settings.CustomShortcuts);
_updateSource?.Dispose(); _updateSource?.Dispose();

View file

@ -180,7 +180,7 @@ namespace Flow.Launcher.ViewModel
public List<Language> Languages => _translater.LoadAvailableLanguages(); public List<Language> Languages => _translater.LoadAvailableLanguages();
public IEnumerable<int> MaxResultsRange => Enumerable.Range(2, 16); public IEnumerable<int> MaxResultsRange => Enumerable.Range(2, 16);
public ObservableCollection<CustomShortcutModel> ShortCuts => Settings.ShortCuts; public ObservableCollection<CustomShortcutModel> ShortCuts => Settings.CustomShortcuts;
public string TestProxy() public string TestProxy()
{ {