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 {