Skip to content

Commit ddbbd69

Browse files
committed
Make sure back to query results from context menu before changing query
1 parent e463292 commit ddbbd69

File tree

5 files changed

+7
-0
lines changed

5 files changed

+7
-0
lines changed

Flow.Launcher/CustomQueryHotkeySetting.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public void UpdateItem(CustomPluginHotkey item)
7676

7777
private void BtnTestActionKeyword_OnClick(object sender, RoutedEventArgs e)
7878
{
79+
App.API.BackToQueryResults();
7980
App.API.ChangeQuery(tbAction.Text);
8081
Application.Current.MainWindow.Show();
8182
Application.Current.MainWindow.Opacity = 1;

Flow.Launcher/CustomShortcutSetting.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ private void cmdEsc_OnPress(object sender, ExecutedRoutedEventArgs e)
6464

6565
private void BtnTestShortcut_OnClick(object sender, RoutedEventArgs e)
6666
{
67+
App.API.BackToQueryResults();
6768
App.API.ChangeQuery(tbExpand.Text);
6869
Application.Current.MainWindow.Show();
6970
Application.Current.MainWindow.Opacity = 1;

Flow.Launcher/ResultListBox.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ private void ResultList_MouseMove(object sender, MouseEventArgs e)
149149
var rawQuery = query;
150150
var effect = DragDrop.DoDragDrop((DependencyObject)sender, data, DragDropEffects.Move | DragDropEffects.Copy);
151151
if (effect == DragDropEffects.Move)
152+
{
153+
App.API.BackToQueryResults();
152154
App.API.ChangeQuery(rawQuery, true);
155+
}
153156
}
154157
private void ResultListBox_OnPreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
155158
{

Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public string Category
6464
private void ShowCommandQuery(string action)
6565
{
6666
var actionKeyword = PluginManagerData.Metadata.ActionKeywords.Any() ? PluginManagerData.Metadata.ActionKeywords[0] + " " : String.Empty;
67+
App.API.BackToQueryResults();
6768
App.API.ChangeQuery($"{actionKeyword}{action} {_plugin.Name}");
6869
App.API.ShowMainWindow();
6970
}

Flow.Launcher/ViewModel/PluginViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ private void OpenSourceCodeLink()
146146
[RelayCommand]
147147
private void OpenDeletePluginWindow()
148148
{
149+
PluginManager.API.BackToQueryResults();
149150
PluginManager.API.ChangeQuery($"{PluginManagerActionKeyword} uninstall {PluginPair.Metadata.Name}".Trim(), true);
150151
PluginManager.API.ShowMainWindow();
151152
}

0 commit comments

Comments
 (0)