Merge pull request #3529 from Flow-Launcher/home_page_history

Fix Homepage with triggers history results on arrow up
This commit is contained in:
Jeremy Wu 2025-05-11 18:33:53 +10:00 committed by GitHub
commit 1b2b49a47a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -518,9 +518,10 @@ namespace Flow.Launcher.ViewModel
[RelayCommand]
private void SelectPrevItem()
{
if (_history.Items.Count > 0
&& QueryText == string.Empty
&& QueryResultsSelected())
if (QueryResultsSelected() // Results selected
&& string.IsNullOrEmpty(QueryText) // No input
&& Results.Visibility != Visibility.Visible // No items in result list, e.g. when home page is off and no query text is entered, therefore the view is collapsed.
&& _history.Items.Count > 0) // Have history items
{
lastHistoryIndex = 1;
ReverseHistory();