add subscriber for show history result toggle in settings

This commit is contained in:
Jeremy 2025-05-17 20:41:25 +10:00
parent 003df049e1
commit b4955f7474
2 changed files with 15 additions and 1 deletions

View file

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

View file

@ -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();