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
@@ -115,7 +115,12 @@ class BangDataRepository extends _$BangDataRepository {
String trigger,
String searchQuery, {
required int maxEntryCount,
}) {
}) async {
// Skip capturing history if maxEntryCount is 0
if (maxEntryCount <= 0) {
return;
}
final db = ref.read(bangDatabaseProvider);
//Pack in a transaction to bundle rebuilds of watch() queries
return db.transaction(() async {
@@ -42,7 +42,7 @@ final class BangDataRepositoryProvider
}
String _$bangDataRepositoryHash() =>
r'e3833d71ca51bfe51feb9f137e154dfebf8b053d';
r'c562ef10d75ca6dee13805f84d2491cf2a89aaac';
abstract class _$BangDataRepository extends $Notifier<void> {
void build();