make search history entry count configurable

This commit is contained in:
Fabian Freund
2026-02-04 06:49:28 +01:00
parent 2bf38692a1
commit f9b95f1507
14 changed files with 247 additions and 9 deletions
@@ -81,7 +81,12 @@ Stream<List<BangData>> frequentBangList(Ref ref) {
@Riverpod()
Stream<List<SearchHistoryEntry>> searchHistory(Ref ref) {
final repository = ref.watch(bangDataRepositoryProvider.notifier);
return repository.watchSearchHistory(limit: 3); //TODO: make count dynamic
final maxSearchHistoryEntries = ref.watch(
generalSettingsWithDefaultsProvider.select(
(s) => s.maxSearchHistoryEntries,
),
);
return repository.watchSearchHistory(limit: maxSearchHistoryEntries);
}
@Riverpod()