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; }