π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] simplify album removal tap handling
r4khul69c0336ee495
diff --git a/mobile/apps/photos/lib/ui/viewer/file_details/albums_item_widget.dart b/mobile/apps/photos/lib/ui/viewer/file_details/albums_item_widget.dartindex 3d838fb8f4..344a7b006d 100644--- a/mobile/apps/photos/lib/ui/viewer/file_details/albums_item_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/file_details/albums_item_widget.dart@@ -235,18 +235,11 @@ class _AlbumChip extends StatelessWidget {}}-class _RemoveAlbumButton extends StatefulWidget {+class _RemoveAlbumButton extends StatelessWidget {const _RemoveAlbumButton({required this.onTap});final Future<void> Function() onTap;- @override- State<_RemoveAlbumButton> createState() => _RemoveAlbumButtonState();-}--class _RemoveAlbumButtonState extends State<_RemoveAlbumButton> {- bool _isExecuting = false;-@overrideWidget build(BuildContext context) {final colors = context.componentColors;@@ -254,15 +247,12 @@ class _RemoveAlbumButtonState extends State<_RemoveAlbumButton> {message: context.strings.removeFromAlbum,child: Semantics(button: true,- enabled: !_isExecuting,label: context.strings.removeFromAlbum,child: MouseRegion(- cursor: _isExecuting- ? SystemMouseCursors.basic- : SystemMouseCursors.click,+ cursor: SystemMouseCursors.click,child: GestureDetector(behavior: HitTestBehavior.opaque,- onTap: _isExecuting ? () {} : _handleTap,+ onTap: onTap,child: SizedBox.square(dimension: 24,child: Center(@@ -289,13 +279,4 @@ class _RemoveAlbumButtonState extends State<_RemoveAlbumButton> {),);}-- Future<void> _handleTap() async {- setState(() => _isExecuting = true);- try {- await widget.onTap();- } finally {- if (mounted) setState(() => _isExecuting = false);- }- }}