From 3d20a602df9459fc746613b60380c35751afa987 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Wed, 5 Oct 2022 19:55:49 +0800 Subject: [PATCH] Rename ShortcutModel to CustomShortcutModel --- .../UserSettings/Settings.cs | 14 +++++++------- Flow.Launcher/CustomShortcutSetting.xaml.cs | 2 +- Flow.Launcher/ViewModel/MainViewModel.cs | 2 +- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index b56989e7d..871317bd3 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -204,7 +204,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings // This needs to be loaded last by staying at the bottom public PluginsSettings PluginSettings { get; set; } = new PluginsSettings(); - internal ObservableCollection ShortCuts { get; set; } = new(); + internal ObservableCollection ShortCuts { get; set; } = new(); } public enum LastQueryMode @@ -221,12 +221,12 @@ namespace Flow.Launcher.Infrastructure.UserSettings Dark } - public struct ShortCutModel + public struct CustomShortcutModel { public string Key { get; set; } public string Value { get; set; } - public ShortCutModel(string key, string value) + public CustomShortcutModel(string key, string value) { Key = key; Value = value; @@ -234,7 +234,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings public override bool Equals(object obj) { - return obj is ShortCutModel other && + return obj is CustomShortcutModel other && Key == other.Key && Value == other.Value; } @@ -250,14 +250,14 @@ namespace Flow.Launcher.Infrastructure.UserSettings value = Value; } - public static implicit operator (string Key, string Value)(ShortCutModel value) + public static implicit operator (string Key, string Value)(CustomShortcutModel value) { return (value.Key, value.Value); } - public static implicit operator ShortCutModel((string Key, string Value) value) + public static implicit operator CustomShortcutModel((string Key, string Value) value) { - return new ShortCutModel(value.Key, value.Value); + return new CustomShortcutModel(value.Key, value.Value); } } } diff --git a/Flow.Launcher/CustomShortcutSetting.xaml.cs b/Flow.Launcher/CustomShortcutSetting.xaml.cs index feea064a4..ce16981d8 100644 --- a/Flow.Launcher/CustomShortcutSetting.xaml.cs +++ b/Flow.Launcher/CustomShortcutSetting.xaml.cs @@ -19,7 +19,7 @@ namespace Flow.Launcher public string Key { get; set; } public string Value { get; set; } - public ShortCutModel ShortCut => (Key, Value); + public CustomShortcutModel ShortCut => (Key, Value); public CustomShortcutSetting() { InitializeComponent(); diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 25458f278..134e85d28 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -662,7 +662,7 @@ namespace Flow.Launcher.ViewModel } } - private static Query ConstructQuery(string queryText, IEnumerable shortcuts) + private static Query ConstructQuery(string queryText, IEnumerable shortcuts) { StringBuilder queryBuilder = new(queryText); diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index bee0419d9..1f088a869 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -180,7 +180,7 @@ namespace Flow.Launcher.ViewModel public List Languages => _translater.LoadAvailableLanguages(); public IEnumerable MaxResultsRange => Enumerable.Range(2, 16); - public ObservableCollection ShortCuts => Settings.ShortCuts; + public ObservableCollection ShortCuts => Settings.ShortCuts; public string TestProxy() { @@ -541,7 +541,7 @@ namespace Flow.Launcher.ViewModel public CustomPluginHotkey SelectedCustomPluginHotkey { get; set; } - public ShortCutModel? SelectedCustomShortcut { get; set; } + public CustomShortcutModel? SelectedCustomShortcut { get; set; } public int? SelectCustomShortcutIndex { get; set; } #endregion