mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
add new public api for chaning the query list back to query results list
This commit is contained in:
parent
7e9ed8e47a
commit
3c3087793a
3 changed files with 17 additions and 1 deletions
|
|
@ -298,5 +298,11 @@ namespace Flow.Launcher.Plugin
|
|||
/// </summary>
|
||||
/// <param name="reselect">Choose the first result after reload if true; keep the last selected result if false. Default is true.</param>
|
||||
public void ReQuery(bool reselect = true);
|
||||
|
||||
/// <summary>
|
||||
/// Back to the query results.
|
||||
/// This method should run when selected item is from context menu or history.
|
||||
/// </summary>
|
||||
public void BackToQueryResults();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -318,6 +318,8 @@ namespace Flow.Launcher
|
|||
|
||||
public void ReQuery(bool reselect = true) => _mainVM.ReQuery(reselect);
|
||||
|
||||
public void BackToQueryResults() => _mainVM.BackToQueryResults();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
|
@ -484,6 +484,14 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
public void BackToQueryResults()
|
||||
{
|
||||
if (!SelectedIsFromQueryResults())
|
||||
{
|
||||
SelectedResults = Results;
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void ToggleGameMode()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue