mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
32 lines
787 B
C#
32 lines
787 B
C#
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||
|
|
using CommunityToolkit.Mvvm.DependencyInjection;
|
||
|
|
using Flow.Launcher.Infrastructure.UserSettings;
|
||
|
|
using Flow.Launcher.Avalonia.Helper;
|
||
|
|
using System;
|
||
|
|
|
||
|
|
namespace Flow.Launcher.Avalonia.ViewModel.SettingPages;
|
||
|
|
|
||
|
|
public partial class HotkeySettingsViewModel : ObservableObject
|
||
|
|
{
|
||
|
|
private readonly Settings _settings;
|
||
|
|
|
||
|
|
public HotkeySettingsViewModel()
|
||
|
|
{
|
||
|
|
_settings = Ioc.Default.GetRequiredService<Settings>();
|
||
|
|
}
|
||
|
|
|
||
|
|
public string ToggleHotkey
|
||
|
|
{
|
||
|
|
get => _settings.Hotkey;
|
||
|
|
set
|
||
|
|
{
|
||
|
|
if (_settings.Hotkey != value)
|
||
|
|
{
|
||
|
|
_settings.Hotkey = value;
|
||
|
|
HotKeyMapper.SetToggleHotkey(value);
|
||
|
|
OnPropertyChanged();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|