Skip to content

Commit b4955f7

Browse files
committed
add subscriber for show history result toggle in settings
1 parent 003df04 commit b4955f7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,20 @@ public bool ShowHomePage
173173
}
174174
}
175175

176-
public bool ShowHistoryResultsForHomePage { get; set; } = false;
176+
public bool _showHistoryResultsForHomePage { get; set; } = false;
177+
public bool ShowHistoryResultsForHomePage
178+
{
179+
get => _showHistoryResultsForHomePage;
180+
set
181+
{
182+
if(_showHistoryResultsForHomePage != value)
183+
{
184+
_showHistoryResultsForHomePage = value;
185+
OnPropertyChanged();
186+
}
187+
}
188+
}
189+
177190
public int MaxHistoryResultsToShowForHomePage { get; set; } = 5;
178191

179192
public int CustomExplorerIndex { get; set; } = 0;

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ private async void OnLoaded(object sender, RoutedEventArgs _)
275275
InitializeContextMenu();
276276
break;
277277
case nameof(Settings.ShowHomePage):
278+
case nameof(Settings.ShowHistoryResultsForHomePage):
278279
if (_viewModel.QueryResultsSelected() && string.IsNullOrEmpty(_viewModel.QueryText))
279280
{
280281
_viewModel.QueryResults();

0 commit comments

Comments
 (0)