set limit of collection suggestions to not greater than 20

This commit is contained in:
ashilkn 2022-08-04 11:22:03 +05:30
parent bb13623704
commit 2428ca16a3

View file

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