From d7579cce9e85c934e0e33224e98bf1f0cef43596 Mon Sep 17 00:00:00 2001 From: 01Dri Date: Sat, 11 Oct 2025 03:23:14 -0300 Subject: [PATCH] fix erros --- Flow.Launcher/Storage/History.cs | 10 +++++----- Flow.Launcher/ViewModel/MainViewModel.cs | 6 +----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Flow.Launcher/Storage/History.cs b/Flow.Launcher/Storage/History.cs index 4ae24c202..d99bfbfdb 100644 --- a/Flow.Launcher/Storage/History.cs +++ b/Flow.Launcher/Storage/History.cs @@ -16,14 +16,14 @@ namespace Flow.Launcher.Storage private int _maxHistory = 300; - public void AddToHistory(Result result, bool isQuery) + public void AddToHistory(Result result, Settings settings) { - if (isQuery) - { - AddLastQuery(result); + if (!settings.ShowHistoryOnHomePage) return; + if (settings.ShowHistoryQueryResultsForHomePage) + { + AddLastQuery(result); return; } - AddLastOpened(result); } diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index febb2d05e..77fa6426d 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -536,11 +536,7 @@ namespace Flow.Launcher.ViewModel if (QueryResultsSelected()) { - if (Settings.ShowHistoryOnHomePage) - { - _history.AddToHistory(result, Settings.ShowHistoryQueryResultsForHomePage); - } - + _history.AddToHistory(result, Settings); _userSelectedRecord.Add(result); lastHistoryIndex = 1; }