mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Invoke visibility changed event when previewing
This commit is contained in:
parent
d73f3a165b
commit
0611340d71
3 changed files with 4 additions and 5 deletions
|
|
@ -80,7 +80,7 @@ namespace Flow.Launcher
|
|||
private void BtnTestActionKeyword_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
App.API.ChangeQuery(tbAction.Text);
|
||||
_mainViewModel.Show(false);
|
||||
_mainViewModel.Show();
|
||||
Application.Current.MainWindow.Focus();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace Flow.Launcher
|
|||
private void BtnTestShortcut_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
App.API.ChangeQuery(tbExpand.Text);
|
||||
_mainViewModel.Show(false);
|
||||
_mainViewModel.Show();
|
||||
Application.Current.MainWindow.Focus();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1359,7 +1359,7 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
public void Show(bool invokeEvent = true)
|
||||
public void Show()
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
|
|
@ -1368,8 +1368,7 @@ namespace Flow.Launcher.ViewModel
|
|||
MainWindowOpacity = 1;
|
||||
|
||||
MainWindowVisibilityStatus = true;
|
||||
if (invokeEvent)
|
||||
VisibilityChanged?.Invoke(this, new VisibilityChangedEventArgs { IsVisible = true });
|
||||
VisibilityChanged?.Invoke(this, new VisibilityChangedEventArgs { IsVisible = true });
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue