mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 13:42:24 +00:00
Optimize HotkeyHandler
This commit is contained in:
parent
98613c43ca
commit
c0cd46a5aa
1 changed files with 5 additions and 1 deletions
|
@ -24,7 +24,6 @@ namespace v2rayN.Desktop.Handler
|
|||
{
|
||||
_config = config;
|
||||
_updateFunc = updateFunc;
|
||||
_hotKeyManager = new GlobalHotKeys.HotKeyManager();
|
||||
|
||||
Register();
|
||||
}
|
||||
|
@ -36,6 +35,11 @@ namespace v2rayN.Desktop.Handler
|
|||
|
||||
private void Register()
|
||||
{
|
||||
if (_config.GlobalHotkeys.Any(t => t.KeyCode > 0) == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_hotKeyManager ??= new GlobalHotKeys.HotKeyManager();
|
||||
_hotkeyTriggerDic.Clear();
|
||||
|
||||
foreach (var item in _config.GlobalHotkeys)
|
||||
|
|
Loading…
Reference in a new issue