mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Remove redundant OnPropertyChagned
This commit is contained in:
@@ -74,20 +74,23 @@ namespace Wox
|
||||
QueryTextBox.Focus();
|
||||
QueryTextBox.CaretIndex = QueryTextBox.Text.Length;
|
||||
};
|
||||
vm.MainWindowVisibilityChanged += (o, e) =>
|
||||
vm.PropertyChanged += (o, e) =>
|
||||
{
|
||||
if (vm.MainWindowVisibility.IsVisible())
|
||||
if (e.PropertyName == nameof(vm.MainWindowVisibility))
|
||||
{
|
||||
Activate();
|
||||
QueryTextBox.Focus();
|
||||
Left = GetWindowsLeft();
|
||||
Top = GetWindowsTop();
|
||||
_settings.ActivateTimes++;
|
||||
}
|
||||
else
|
||||
{
|
||||
_settings.WindowLeft = Left;
|
||||
_settings.WindowTop = Top;
|
||||
if (vm.MainWindowVisibility.IsVisible())
|
||||
{
|
||||
Activate();
|
||||
QueryTextBox.Focus();
|
||||
Left = GetWindowsLeft();
|
||||
Top = GetWindowsTop();
|
||||
_settings.ActivateTimes++;
|
||||
}
|
||||
else
|
||||
{
|
||||
_settings.WindowLeft = Left;
|
||||
_settings.WindowTop = Top;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user