make search history entry count configurable
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user