mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Refactoring visibility related events
1. remove unnecessary events from MainViewModel 2. remove usage of Obsolete api (show, hide etc) 3. fix space problem in #660 4. part of #486 5. fix up/down key bug introduced in 92b7ca6a1bafd254e39ee92812ff691906cd85c1 6. fix #678
This commit is contained in:
@@ -128,15 +128,15 @@ namespace Wox
|
||||
{
|
||||
if (HotkeyControl.CurrentHotkeyAvailable)
|
||||
{
|
||||
SetHotkey(HotkeyControl.CurrentHotkey, delegate
|
||||
SetHotkey(HotkeyControl.CurrentHotkey, (o, args) =>
|
||||
{
|
||||
if (!Application.Current.MainWindow.IsVisible)
|
||||
{
|
||||
_api.ShowApp();
|
||||
Application.Current.MainWindow.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
_api.HideApp();
|
||||
Application.Current.MainWindow.Visibility = Visibility.Hidden;
|
||||
}
|
||||
});
|
||||
RemoveHotkey(_settings.Hotkey);
|
||||
|
||||
Reference in New Issue
Block a user