mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove Settings.CustomPluginHotkeys null check
This commit is contained in:
parent
1057f4d2f6
commit
d46deddb94
2 changed files with 3 additions and 8 deletions
|
|
@ -30,8 +30,6 @@ namespace Flow.Launcher
|
|||
{
|
||||
if (!update)
|
||||
{
|
||||
_settings.CustomPluginHotkeys ??= new ObservableCollection<CustomPluginHotkey>();
|
||||
|
||||
var pluginHotkey = new CustomPluginHotkey
|
||||
{
|
||||
Hotkey = HotkeyControl.CurrentHotkey.ToString(), ActionKeyword = tbAction.Text
|
||||
|
|
|
|||
|
|
@ -105,14 +105,11 @@ internal static class HotKeyMapper
|
|||
new(RegisteredHotkeyType.CycleHistoryUp, HotkeyType.SearchWindow, _settings.CycleHistoryUpHotkey, "CycleHistoryUpHotkey", _mainViewModel.ReverseHistoryCommand, null, () => _settings.CycleHistoryUpHotkey = ""),
|
||||
new(RegisteredHotkeyType.CycleHistoryDown, HotkeyType.SearchWindow, _settings.CycleHistoryDownHotkey, "CycleHistoryDownHotkey", _mainViewModel.ForwardHistoryCommand, null, () => _settings.CycleHistoryDownHotkey = "")
|
||||
};
|
||||
|
||||
|
||||
// Custom query global hotkeys
|
||||
if (_settings.CustomPluginHotkeys != null)
|
||||
foreach (var customPluginHotkey in _settings.CustomPluginHotkeys)
|
||||
{
|
||||
foreach (var customPluginHotkey in _settings.CustomPluginHotkeys)
|
||||
{
|
||||
list.Add(new(RegisteredHotkeyType.CustomQuery, HotkeyType.Global, customPluginHotkey.Hotkey, "customQueryHotkey", CustomQueryHotkeyCommand, customPluginHotkey, () => customPluginHotkey.Hotkey = ""));
|
||||
}
|
||||
list.Add(new(RegisteredHotkeyType.CustomQuery, HotkeyType.Global, customPluginHotkey.Hotkey, "customQueryHotkey", CustomQueryHotkeyCommand, customPluginHotkey, () => customPluginHotkey.Hotkey = ""));
|
||||
}
|
||||
|
||||
// Plugin hotkeys
|
||||
|
|
|
|||
Loading…
Reference in a new issue