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