From b40c1f86245fe051323bb202275a774dd9b3b6ad Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Sat, 12 Feb 2022 17:29:19 -0600 Subject: [PATCH 1/3] Reselect to Main Query window when show up --- Flow.Launcher/ViewModel/MainViewModel.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 0fe3bdf80..e92867019 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -774,6 +774,8 @@ namespace Flow.Launcher.ViewModel { MainWindowVisibility = Visibility.Visible; + SelectedResults = Results; + MainWindowVisibilityStatus = true; MainWindowOpacity = 1; From b5b202fe8884f33ed6484bacf6144768666452e6 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Sat, 12 Feb 2022 18:06:45 -0600 Subject: [PATCH 2/3] Revert to results panel before hiding when executing context menu --- Flow.Launcher/ViewModel/MainViewModel.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index e92867019..8a3b99801 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -211,11 +211,6 @@ namespace Flow.Launcher.ViewModel SpecialKeyState = GlobalHotkey.CheckModifiers() }); - if (hideWindow) - { - Hide(); - } - if (SelectedIsFromQueryResults()) { _userSelectedRecord.Add(result); @@ -225,6 +220,11 @@ namespace Flow.Launcher.ViewModel { SelectedResults = Results; } + + if (hideWindow) + { + Hide(); + } } }); @@ -772,10 +772,10 @@ namespace Flow.Launcher.ViewModel public void Show() { - MainWindowVisibility = Visibility.Visible; - SelectedResults = Results; + MainWindowVisibility = Visibility.Visible; + MainWindowVisibilityStatus = true; MainWindowOpacity = 1; From e9c402eb608779876450f9ff90067bd112b7fbc8 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 3 Apr 2023 14:09:36 +0800 Subject: [PATCH 3/3] Fix reset to results logic --- Flow.Launcher/ViewModel/MainViewModel.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 597203096..27809f67b 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -286,11 +286,7 @@ namespace Flow.Launcher.ViewModel _userSelectedRecord.Add(result); _history.Add(result.OriginQuery.RawQuery); } - else - { - SelectedResults = Results; - } - + if (hideWindow) { Hide(); @@ -1002,8 +998,6 @@ namespace Flow.Launcher.ViewModel { Application.Current.Dispatcher.Invoke(() => { - SelectedResults = Results; - MainWindowVisibility = Visibility.Visible; MainWindowOpacity = 1; @@ -1017,6 +1011,10 @@ namespace Flow.Launcher.ViewModel // Trick for no delay MainWindowOpacity = 0; + if (!SelectedIsFromQueryResults()) + { + SelectedResults = Results; + } switch (Settings.LastQueryMode) { case LastQueryMode.Empty: