Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,15 @@ public interface IPublicAPI

/// <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();
}
}
2 changes: 2 additions & 0 deletions Flow.Launcher/PublicAPIInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ public bool IsGameModeOn()

public void ReQuery(bool reselect = true) => _mainVM.ReQuery(reselect);

public void BackToQueryResults() => _mainVM.BackToQueryResults();

#endregion

#region Private Methods
Expand Down
10 changes: 9 additions & 1 deletion Flow.Launcher/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
Expand Down Expand Up @@ -484,6 +484,14 @@ private void Esc()
}
}

public void BackToQueryResults()
{
if (!SelectedIsFromQueryResults())
{
SelectedResults = Results;
}
}

[RelayCommand]
public void ToggleGameMode()
{
Expand Down
Loading