Skip to content

Commit 0611340

Browse files
committed
Invoke visibility changed event when previewing
1 parent d73f3a1 commit 0611340

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Flow.Launcher/CustomQueryHotkeySetting.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void UpdateItem(CustomPluginHotkey item)
8080
private void BtnTestActionKeyword_OnClick(object sender, RoutedEventArgs e)
8181
{
8282
App.API.ChangeQuery(tbAction.Text);
83-
_mainViewModel.Show(false);
83+
_mainViewModel.Show();
8484
Application.Current.MainWindow.Focus();
8585
}
8686

Flow.Launcher/CustomShortcutSetting.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private void cmdEsc_OnPress(object sender, ExecutedRoutedEventArgs e)
6868
private void BtnTestShortcut_OnClick(object sender, RoutedEventArgs e)
6969
{
7070
App.API.ChangeQuery(tbExpand.Text);
71-
_mainViewModel.Show(false);
71+
_mainViewModel.Show();
7272
Application.Current.MainWindow.Focus();
7373
}
7474
}

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,7 @@ public void ToggleFlowLauncher()
13591359
}
13601360
}
13611361

1362-
public void Show(bool invokeEvent = true)
1362+
public void Show()
13631363
{
13641364
Application.Current.Dispatcher.Invoke(() =>
13651365
{
@@ -1368,8 +1368,7 @@ public void Show(bool invokeEvent = true)
13681368
MainWindowOpacity = 1;
13691369

13701370
MainWindowVisibilityStatus = true;
1371-
if (invokeEvent)
1372-
VisibilityChanged?.Invoke(this, new VisibilityChangedEventArgs { IsVisible = true });
1371+
VisibilityChanged?.Invoke(this, new VisibilityChangedEventArgs { IsVisible = true });
13731372
});
13741373
}
13751374

0 commit comments

Comments
 (0)