Skip to content

Commit 54994dd

Browse files
committed
Initialize home query when window is loaded
1 parent 17a0834 commit 54994dd

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ private async void OnLoaded(object sender, RoutedEventArgs _)
292292
DependencyPropertyDescriptor
293293
.FromProperty(VisibilityProperty, typeof(StackPanel))
294294
.AddValueChanged(History, (s, e) => UpdateClockPanelVisibility());
295+
296+
// Initialize query state
297+
_viewModel.InitializeQuery();
295298
}
296299

297300
private async void OnClosing(object sender, CancelEventArgs e)

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,14 @@ private bool QueryResultsPreviewed()
10741074

10751075
#region Query
10761076

1077+
public void InitializeQuery()
1078+
{
1079+
if (Settings.ShowHomeQuery)
1080+
{
1081+
_ = QueryResultsAsync(false);
1082+
}
1083+
}
1084+
10771085
public void Query(bool searchDelay, bool isReQuery = false)
10781086
{
10791087
if (QueryResultsSelected())

0 commit comments

Comments
 (0)