π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] Hide trash FAB during selection
Priyanshu Dangaref7c93daad2a0
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dart b/mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dartindex abe6bae9dc..f664544c89 100644--- a/mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dart+++ b/mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dart@@ -143,18 +143,26 @@ class _TrashPageState extends State<_TrashPage> {],),),- floatingActionButton: Padding(- padding: const EdgeInsets.only(bottom: 4),- child: FABComponent(- label: l10n.deleteAll,- icon: const HugeIcon(icon: HugeIcons.strokeRoundedDelete02),- shouldShowSuccessConfirmation: false,- shouldShowSuccessState: false,- shouldSurfaceExecutionStates: false,- onTap: () async {- await emptyTrash(context, _isOnEnteTrash);- },- ),+ floatingActionButton: ListenableBuilder(+ listenable: _selectedFiles,+ builder: (context, _) {+ if (_selectedFiles.files.isNotEmpty) {+ return const SizedBox.shrink();+ }+ return Padding(+ padding: const EdgeInsets.only(bottom: 4),+ child: FABComponent(+ label: l10n.deleteAll,+ icon: const HugeIcon(icon: HugeIcons.strokeRoundedDelete02),+ shouldShowSuccessConfirmation: false,+ shouldShowSuccessState: false,+ shouldSurfaceExecutionStates: false,+ onTap: () async {+ await emptyTrash(context, _isOnEnteTrash);+ },+ ),+ );+ },),floatingActionButtonLocation:FloatingActionButtonLocation.centerFloat,