π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Make the suggestion dismissible
laurenspriem7d995bd83aad
diff --git a/mobile/lib/ui/viewer/people/people_page.dart b/mobile/lib/ui/viewer/people/people_page.dartindex 9cbd1a26c4..6cdd1f51bb 100644--- a/mobile/lib/ui/viewer/people/people_page.dart+++ b/mobile/lib/ui/viewer/people/people_page.dart@@ -66,6 +66,7 @@ class _PeoplePageState extends State<PeoplePage> {files!.isNotEmpty);bool userDismissedSuggestionBanner = false;+ bool userDismissedPersonGallerySuggestion = false;late final StreamSubscription<LocalPhotosUpdatedEvent> _filesUpdatedEvent;late final StreamSubscription<PeopleChangedEvent> _peopleChangedEvent;@@ -260,7 +261,7 @@ class _PeoplePageState extends State<PeoplePage> {}}-class _Gallery extends StatelessWidget {+class _Gallery extends StatefulWidget {final String tagPrefix;final SelectedFiles selectedFiles;final List<EnteFile> personFiles;@@ -275,6 +276,13 @@ class _Gallery extends StatelessWidget {required this.personEntity,});+ @override+ State<_Gallery> createState() => _GalleryState();+}++class _GalleryState extends State<_Gallery> {+ bool userDismissedPersonGallerySuggestion = false;+@overrideWidget build(BuildContext context) {return Gallery(@@ -284,7 +292,7 @@ class _Gallery extends StatelessWidget {limit,asc,}) async {- final result = await loadPersonFiles();+ final result = await widget.loadPersonFiles();return Future.value(FileLoadResult(result,@@ -303,12 +311,14 @@ class _Gallery extends StatelessWidget {EventType.deletedFromEverywhere,EventType.hide,},- tagPrefix: tagPrefix + tagPrefix,- selectedFiles: selectedFiles,- initialFiles: personFiles.isNotEmpty ? [personFiles.first] : [],+ tagPrefix: widget.tagPrefix + widget.tagPrefix,+ selectedFiles: widget.selectedFiles,+ initialFiles:+ widget.personFiles.isNotEmpty ? [widget.personFiles.first] : [],header: Column(children: [- personEntity.data.email != null && personEntity.data.email!.isNotEmpty+ widget.personEntity.data.email != null &&+ widget.personEntity.data.email!.isNotEmpty? const SizedBox.shrink(): Padding(padding: const EdgeInsets.only(top: 12, bottom: 8),@@ -319,14 +329,25 @@ class _Gallery extends StatelessWidget {onTap: () async {await routeToPage(context,- LinkEmailScreen(personEntity.remoteID),+ LinkEmailScreen(widget.personEntity.remoteID),);},),),- PersonGallerySuggestion(- person: personEntity,- ),+ !userDismissedPersonGallerySuggestion+ ? Dismissible(+ key: const Key("personGallerySuggestion"),+ direction: DismissDirection.horizontal,+ onDismissed: (direction) {+ setState(() {+ userDismissedPersonGallerySuggestion = true;+ });+ },+ child: PersonGallerySuggestion(+ person: widget.personEntity,+ ),+ )+ : const SizedBox.shrink(),],),);