π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] Hide cover shortcuts during selection
r4khul7e2b440f2d1b
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dartindex 242dffbcf1..2aa31dc143 100644--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart@@ -371,17 +371,19 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {actionsBuilder: (foregroundColor) =>_getDefaultActions(context, foregroundColor: foregroundColor),coverActions: [- AlbumCoverActionButton(- icon: HugeIcons.strokeRoundedPlay,- tooltip: strings.slideshow,- onTap: _startAlbumSlideshow,- ),- if (galleryType.showMap())+ if (widget.selectedFiles.files.isEmpty) ...[AlbumCoverActionButton(- icon: HugeIcons.strokeRoundedMapsLocation02,- tooltip: strings.map,- onTap: showOnMap,+ icon: HugeIcons.strokeRoundedPlay,+ tooltip: strings.slideshow,+ onTap: _startAlbumSlideshow,),+ if (galleryType.showMap())+ AlbumCoverActionButton(+ icon: HugeIcons.strokeRoundedMapsLocation02,+ tooltip: strings.map,+ onTap: showOnMap,+ ),+ ],],);}diff --git a/mobile/apps/photos/test/ui/viewer/gallery/collection_page_cover_test.dart b/mobile/apps/photos/test/ui/viewer/gallery/collection_page_cover_test.dartindex 217cba5505..e1c18c74b4 100644--- a/mobile/apps/photos/test/ui/viewer/gallery/collection_page_cover_test.dart+++ b/mobile/apps/photos/test/ui/viewer/gallery/collection_page_cover_test.dart@@ -33,6 +33,7 @@ import "package:photos/services/ignored_files_service.dart";import "package:photos/ui/collections/album/row_item.dart";import "package:photos/ui/viewer/gallery/collection_page.dart";import "package:photos/ui/viewer/gallery/component/album_cover_app_bar.dart";+import "package:photos/ui/viewer/gallery/gallery_app_bar_widget.dart";import "package:photos/ui/viewer/gallery/state/gallery_files_inherited_widget.dart";import "package:photos/ui/viewer/gallery/state/inherited_search_filter_data.dart";import "package:photos/ui/viewer/gallery/state/search_filter_data_provider.dart";@@ -182,6 +183,16 @@ void main() {});await _pumpAlbum(tester, collection);await _expectCover(tester, newest, count: 2);+ final selectedFiles = tester+ .widget<GalleryAppBarWidget>(find.byType(GalleryAppBarWidget))+ .selectedFiles;+ expect(find.byType(AlbumCoverActionButton), findsNWidgets(2));+ selectedFiles.toggleSelection(newest);+ await tester.pump();+ expect(find.byType(AlbumCoverActionButton), findsNothing);+ selectedFiles.toggleSelection(newest);+ await tester.pump();+ expect(find.byType(AlbumCoverActionButton), findsNWidgets(2));collection.pubMagicMetadata = CollectionPubMagicMetadata(asc: true);Bus.instance.fire(