π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Throw exception and instruction on what to do instead if GenericSearchResult.previewThumbnail() is used when ResultType is 'shared'(which is the case for contacts search)
ashilkn1e50f5280150
diff --git a/mobile/lib/models/search/generic_search_result.dart b/mobile/lib/models/search/generic_search_result.dartindex 6c518e0289..1786120815 100644--- a/mobile/lib/models/search/generic_search_result.dart+++ b/mobile/lib/models/search/generic_search_result.dart@@ -33,6 +33,11 @@ class GenericSearchResult extends SearchResult {@overrideEnteFile? previewThumbnail() {+ if (type() == ResultType.shared) {+ throw Exception(+ "Do not use first file as thumbnail. Use user avatar instead.",+ );+ }return _files.isEmpty ? null : _files.first;}diff --git a/mobile/lib/ui/viewer/search_tab/contacts_section.dart b/mobile/lib/ui/viewer/search_tab/contacts_section.dartindex 8f6ed6354d..d92a314684 100644--- a/mobile/lib/ui/viewer/search_tab/contacts_section.dart+++ b/mobile/lib/ui/viewer/search_tab/contacts_section.dart@@ -171,8 +171,6 @@ class _ContactRecommendationState extends State<ContactRecommendation> {@overrideWidget build(BuildContext context) {- final heroTag = widget.contactSearchResult.heroTag() +- (widget.contactSearchResult.previewThumbnail()?.tag ?? "");final enteTextTheme = getEnteTextTheme(context);return Padding(padding: const EdgeInsets.symmetric(horizontal: 2.5),