Update result modifiers when OpenResultModifiers is changed

This commit is contained in:
Jack251970 2025-07-13 10:55:13 +08:00
parent c5373f6abf
commit ed4fdb7561
2 changed files with 21 additions and 1 deletions

View file

@ -40,7 +40,21 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}";
public string OpenResultModifiers { get; set; } = KeyConstant.Alt;
private string _openResultModifiers = KeyConstant.Alt;
public string OpenResultModifiers
{
get => _openResultModifiers;
set
{
if (_openResultModifiers != value)
{
_openResultModifiers = value;
OnPropertyChanged();
}
}
}
public string ColorScheme { get; set; } = "System";
private bool _showOpenResultHotkey = true;

View file

@ -323,6 +323,12 @@ namespace Flow.Launcher
case nameof(Settings.ShowAtTopmost):
Topmost = _settings.ShowAtTopmost;
break;
case nameof(Settings.OpenResultModifiers):
if (_viewModel.QueryResultsSelected() && string.IsNullOrEmpty(_viewModel.QueryText))
{
_viewModel.QueryResults();
}
break;
}
};