Skip to content

Commit b47206e

Browse files
committed
add requery to refresh the results after drag
1 parent 69bca5d commit b47206e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Flow.Launcher/ResultListBox.xaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.IO;
33
using System.Windows;
44
using System.Windows.Controls;
@@ -61,13 +61,15 @@ private void ListBox_PreviewMouseDown(object sender, MouseButtonEventArgs e)
6161

6262
private Point start;
6363
private string file;
64+
private string query;
6465

6566
private void ResultList_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
6667
{
6768
if (Mouse.DirectlyOver is not FrameworkElement { DataContext: ResultViewModel result })
6869
return;
6970

7071
file = result.Result.CopyText;
72+
query = result.Result.OriginQuery.RawQuery;
7173
start = e.GetPosition(null);
7274
}
7375

@@ -93,6 +95,7 @@ private void ResultList_MouseMove(object sender, MouseEventArgs e)
9395
file
9496
});
9597
DragDrop.DoDragDrop((DependencyObject)sender, data, DragDropEffects.Move | DragDropEffects.Copy);
98+
App.API.ChangeQuery(query, true);
9699
e.Handled = true;
97100
}
98101
}

0 commit comments

Comments
 (0)