From b4955f7474ac7b07658fb40220551865cb9d96aa Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 17 May 2025 20:41:25 +1000 Subject: [PATCH] add subscriber for show history result toggle in settings --- .../UserSettings/Settings.cs | 15 ++++++++++++++- Flow.Launcher/MainWindow.xaml.cs | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 34bf4f90e..387469d24 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -173,7 +173,20 @@ namespace Flow.Launcher.Infrastructure.UserSettings } } - public bool ShowHistoryResultsForHomePage { get; set; } = false; + public bool _showHistoryResultsForHomePage { get; set; } = false; + public bool ShowHistoryResultsForHomePage + { + get => _showHistoryResultsForHomePage; + set + { + if(_showHistoryResultsForHomePage != value) + { + _showHistoryResultsForHomePage = value; + OnPropertyChanged(); + } + } + } + public int MaxHistoryResultsToShowForHomePage { get; set; } = 5; public int CustomExplorerIndex { get; set; } = 0; diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index e243549e3..18bceedd8 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -275,6 +275,7 @@ namespace Flow.Launcher InitializeContextMenu(); break; case nameof(Settings.ShowHomePage): + case nameof(Settings.ShowHistoryResultsForHomePage): if (_viewModel.QueryResultsSelected() && string.IsNullOrEmpty(_viewModel.QueryText)) { _viewModel.QueryResults();