Skip to content

Commit e722927

Browse files
authored
ReQuery method overloading, reselect flag.
1 parent 50f71c0 commit e722927

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public partial class MainViewModel : BaseModel, ISavable
3333
#region Private Fields
3434

3535
private bool _isQueryRunning;
36+
private bool _reselect = true;
3637
private Query _lastQuery;
3738
private Result lastContextMenuResult = new Result();
3839
private List<Result> lastContextMenuResults = new List<Result>();
@@ -216,6 +217,15 @@ public void ReQuery()
216217
}
217218
}
218219

220+
public void ReQuery(bool reselect)
221+
{
222+
if (SelectedIsFromQueryResults())
223+
{
224+
_reselect = reselect;
225+
QueryResults(isReQuery: true);
226+
}
227+
}
228+
219229
[RelayCommand]
220230
private void LoadContextMenu()
221231
{
@@ -1151,7 +1161,8 @@ public void UpdateResultView(IEnumerable<ResultsForUpdate> resultsForUpdates)
11511161
}
11521162
}
11531163

1154-
Results.AddResults(resultsForUpdates, token);
1164+
Results.AddResults(resultsForUpdates, token, _reselect);
1165+
_reselect = true;
11551166
}
11561167

11571168
#endregion

0 commit comments

Comments
 (0)