added limits to suggestions of collection and file name search

This commit is contained in:
ashilkn 2022-08-04 10:21:23 +05:30
parent 35ba604607
commit bb13623704
2 changed files with 4 additions and 1 deletions

View file

@ -1179,6 +1179,7 @@ class FilesDB {
table,
where: '$columnTitle LIKE ?',
whereArgs: ["%$query%"],
limit: 20,
);
final files = _convertToFiles(results);
return files;

View file

@ -202,7 +202,9 @@ class CollectionsService {
)
.toList();
List<CollectionWithThumbnail> result = [];
for (Collection collection in matchedCollection) {
const int limit = 20;
for (int i = 0; i < limit; i++) {
Collection collection = matchedCollection[i];
result.add(
CollectionWithThumbnail(
collection,