Skip to content
1 change: 1 addition & 0 deletions Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void UpdateItem(CustomPluginHotkey item)

private void BtnTestActionKeyword_OnClick(object sender, RoutedEventArgs e)
{
App.API.BackToQueryResults();
App.API.ChangeQuery(tbAction.Text);
Application.Current.MainWindow.Show();
Application.Current.MainWindow.Opacity = 1;
Expand Down
1 change: 1 addition & 0 deletions Flow.Launcher/CustomShortcutSetting.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ private void cmdEsc_OnPress(object sender, ExecutedRoutedEventArgs e)

private void BtnTestShortcut_OnClick(object sender, RoutedEventArgs e)
{
App.API.BackToQueryResults();
App.API.ChangeQuery(tbExpand.Text);
Application.Current.MainWindow.Show();
Application.Current.MainWindow.Opacity = 1;
Expand Down
3 changes: 3 additions & 0 deletions Flow.Launcher/ResultListBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ private void ResultList_MouseMove(object sender, MouseEventArgs e)
var rawQuery = query;
var effect = DragDrop.DoDragDrop((DependencyObject)sender, data, DragDropEffects.Move | DragDropEffects.Copy);
if (effect == DragDropEffects.Move)
{
App.API.BackToQueryResults();
App.API.ChangeQuery(rawQuery, true);
}
}
private void ResultListBox_OnPreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
Expand Down
1 change: 1 addition & 0 deletions Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public string Category
private void ShowCommandQuery(string action)
{
var actionKeyword = PluginManagerData.Metadata.ActionKeywords.Any() ? PluginManagerData.Metadata.ActionKeywords[0] + " " : String.Empty;
App.API.BackToQueryResults();
App.API.ChangeQuery($"{actionKeyword}{action} {_plugin.Name}");
App.API.ShowMainWindow();
}
Expand Down
1 change: 1 addition & 0 deletions Flow.Launcher/ViewModel/PluginViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ private void OpenSourceCodeLink()
[RelayCommand]
private void OpenDeletePluginWindow()
{
PluginManager.API.BackToQueryResults();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make it consistent to App.API? Similar to the following.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use PluginManager.API here because OpenDeletePluginWindow use it to get the api instance.

PluginManager.API.ChangeQuery($"{PluginManagerActionKeyword} uninstall {PluginPair.Metadata.Name}".Trim(), true);
PluginManager.API.ShowMainWindow();
}
Expand Down
Loading