π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
limit number of recents shown
ashilknb1772dff5935
diff --git a/lib/models/search/recent_searches.dart b/lib/models/search/recent_searches.dartindex 95aed2a797..8e095a303b 100644--- a/lib/models/search/recent_searches.dart+++ b/lib/models/search/recent_searches.dart@@ -1,4 +1,5 @@import "package:flutter/material.dart";+import "package:photos/core/constants.dart";import "package:photos/models/search/search_result.dart";class RecentSearches with ChangeNotifier {@@ -12,6 +13,9 @@ class RecentSearches with ChangeNotifier {void add(SearchResult result) {searches.add(result);+ while (searches.length > searchSectionLimit) {+ searches.remove(searches.first);+ }//buffer for not surfacing a new recent search before going to the next//screenFuture.delayed(const Duration(seconds: 1), () {