Add property changed for RegisteredHotkeyData.Hotkey

This commit is contained in:
Jack251970 2025-07-02 12:58:50 +08:00
parent 989206b59c
commit 5910d1de19

View file

@ -9,12 +9,24 @@ namespace Flow.Launcher.Infrastructure.Hotkey;
/// <see cref="UserSettings"/> and <see cref="IHotkeySettings"/> to display errors if user tries to register a hotkey
/// that has already been registered, and optionally provides a way to unregister the hotkey.
/// </summary>
public record RegisteredHotkeyData
public class RegisteredHotkeyData : BaseModel
{
/// <summary>
/// <see cref="HotkeyModel"/> representation of this hotkey.
/// </summary>
public HotkeyModel Hotkey { get; }
private HotkeyModel _hotkey;
public HotkeyModel Hotkey
{
get => _hotkey;
set
{
if (!_hotkey.Equals(value))
{
_hotkey = value;
OnPropertyChanged();
}
}
}
/// <summary>
/// String key in the localization dictionary that represents this hotkey. For example, <c>ReloadPluginHotkey</c>,