mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #3087 from Jack251970/dev1
Add new public api function BackToQueryResults for chaning the query list back to query results list
This commit is contained in:
commit
ac872ac55c
3 changed files with 19 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using Flow.Launcher.Plugin.SharedModels;
|
||||
using Flow.Launcher.Plugin.SharedModels;
|
||||
using JetBrains.Annotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
@ -295,11 +295,17 @@ namespace Flow.Launcher.Plugin
|
|||
|
||||
/// <summary>
|
||||
/// Reloads the query.
|
||||
/// This method should run
|
||||
/// This method should run when selected item is from query results.
|
||||
/// </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();
|
||||
|
||||
/// <summary>
|
||||
/// Displays a standardised Flow message box.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
|
|
@ -319,6 +319,8 @@ namespace Flow.Launcher
|
|||
|
||||
public void ReQuery(bool reselect = true) => _mainVM.ReQuery(reselect);
|
||||
|
||||
public void BackToQueryResults() => _mainVM.BackToQueryResults();
|
||||
|
||||
public MessageBoxResult ShowMsgBox(string messageBoxText, string caption = "", MessageBoxButton button = MessageBoxButton.OK, MessageBoxImage icon = MessageBoxImage.None, MessageBoxResult defaultResult = MessageBoxResult.OK) =>
|
||||
MessageBoxEx.Show(messageBoxText, caption, button, icon, defaultResult);
|
||||
|
||||
|
|
|
|||
|
|
@ -486,6 +486,14 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
public void BackToQueryResults()
|
||||
{
|
||||
if (!SelectedIsFromQueryResults())
|
||||
{
|
||||
SelectedResults = Results;
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void ToggleGameMode()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue