Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

animation

laurenspriem019141ef3be8
diff --git a/mobile/apps/photos/lib/ui/tools/similar_images_page.dart b/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
index bba156a079..652b5102dd 100644
--- a/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
@@ -295,48 +295,51 @@ class _SimilarImagesPageState extends State<SimilarImagesPage> {
final selectedCount = _selectedFiles.files.length;
final hasSelectedFiles = selectedCount > 0;
- if (!hasSelectedFiles) {
- return const SizedBox.shrink();
- }
-
- final colorScheme = getEnteColorScheme(context);
-
- return SafeArea(
- child: Container(
- padding: const EdgeInsets.symmetric(
- horizontal: crossAxisSpacing,
- vertical: 8,
- ),
- decoration: BoxDecoration(
- color: colorScheme.backgroundBase,
- ),
- child: Column(
- children: [
- SizedBox(
- width: double.infinity,
- child: ButtonWidget(
- labelText:
- "Delete $selectedCount photos", // TODO: lau: extract string
- buttonType: ButtonType.critical,
- onTap: () async {
- // TODO: Implement delete functionality
- },
- ),
- ),
- const SizedBox(height: 8),
- SizedBox(
- width: double.infinity,
- child: ButtonWidget(
- labelText: "Unselect all", // TODO: lau: extract string
- buttonType: ButtonType.secondary,
- onTap: () async {
- _selectedFiles.clearAll(fireEvent: false);
- },
+ return AnimatedSwitcher(
+ duration: const Duration(milliseconds: 200),
+ switchInCurve: Curves.easeOut,
+ switchOutCurve: Curves.easeIn,
+ child: hasSelectedFiles
+ ? SafeArea(
+ child: Container(
+ key: const ValueKey('bottom_buttons'),
+ padding: const EdgeInsets.symmetric(
+ horizontal: crossAxisSpacing,
+ vertical: 8,
+ ),
+ decoration: BoxDecoration(
+ color: getEnteColorScheme(context).backgroundBase,
+ ),
+ child: Column(
+ children: [
+ SizedBox(
+ width: double.infinity,
+ child: ButtonWidget(
+ labelText:
+ "Delete $selectedCount photos", // TODO: lau: extract string
+ buttonType: ButtonType.critical,
+ onTap: () async {
+ // TODO: Implement delete functionality
+ },
+ ),
+ ),
+ const SizedBox(height: 8),
+ SizedBox(
+ width: double.infinity,
+ child: ButtonWidget(
+ labelText:
+ "Unselect all", // TODO: lau: extract string
+ buttonType: ButtonType.secondary,
+ onTap: () async {
+ _selectedFiles.clearAll(fireEvent: false);
+ },
+ ),
+ ),
+ ],
+ ),
),
- ),
- ],
- ),
- ),
+ )
+ : const SizedBox.shrink(key: ValueKey('empty')),
);
},
);