Rename ShortcutModel to CustomShortcutModel

This commit is contained in:
Vic 2022-10-05 19:55:49 +08:00
parent 609e8e815c
commit 3d20a602df
4 changed files with 11 additions and 11 deletions

View file

@ -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<ShortCutModel> ShortCuts { get; set; } = new();
internal ObservableCollection<CustomShortcutModel> 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);
}
}
}

View file

@ -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();

View file

@ -662,7 +662,7 @@ namespace Flow.Launcher.ViewModel
}
}
private static Query ConstructQuery(string queryText, IEnumerable<ShortCutModel> shortcuts)
private static Query ConstructQuery(string queryText, IEnumerable<CustomShortcutModel> shortcuts)
{
StringBuilder queryBuilder = new(queryText);

View file

@ -180,7 +180,7 @@ namespace Flow.Launcher.ViewModel
public List<Language> Languages => _translater.LoadAvailableLanguages();
public IEnumerable<int> MaxResultsRange => Enumerable.Range(2, 16);
public ObservableCollection<ShortCutModel> ShortCuts => Settings.ShortCuts;
public ObservableCollection<CustomShortcutModel> 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