Skip to content

armgit / ente

Public Imported from GitHub
0

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

Remove "select extra" button

laurenspriemcad8613e81ad
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 89d50f6a2d..c04e07bf63 100644
--- a/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
@@ -469,30 +469,11 @@ class _SimilarImagesPageState extends State<SimilarImagesPage> {
.toSet();
final bool allFilesFromGroupSelected =
groupSelectedFiles.length == similarFiles.length;
- final hasAnySelection = _selectedFiles.files.isNotEmpty;
- final allGroupFilesSelected = similarFiles.files.every(
- (file) => _selectedFiles.isFileSelected(file),
- );
-
if (groupSelectedFiles.isNotEmpty) {
return _getSmallDeleteButton(
groupSelectedFiles,
allFilesFromGroupSelected,
);
- } else if (hasAnySelection) {
- return _getSmallSelectButton(allGroupFilesSelected, () {
- if (allGroupFilesSelected) {
- // Unselect all files in this group
- _selectedFiles.unSelectAll(
- similarFiles.files.toSet(),
- );
- } else {
- // Select all files in this group
- _selectedFiles.selectAll(
- similarFiles.files.sublist(1).toSet(),
- );
- }
- });
}
return const SizedBox.shrink();
},
@@ -784,35 +765,6 @@ class _SimilarImagesPageState extends State<SimilarImagesPage> {
await deleteFilesFromRemoteOnly(context, allDeleteFiles.toList());
}
- Widget _getSmallSelectButton(bool unselectAll, void Function() onTap) {
- final colorScheme = getEnteColorScheme(context);
- final textTheme = getEnteTextTheme(context);
-
- return GestureDetector(
- onTap: onTap,
- child: Container(
- padding: const EdgeInsets.symmetric(
- horizontal: 8,
- vertical: 8,
- ),
- decoration: BoxDecoration(
- color: unselectAll
- ? getEnteColorScheme(context).primary500
- : getEnteColorScheme(context).strokeFaint,
- borderRadius: BorderRadius.circular(4),
- ),
- child: Text(
- unselectAll
- ? "Unselect all" // TODO: lau: extract string
- : "Select extra", // TODO: lau: extract string
- style: textTheme.smallMuted.copyWith(
- color: unselectAll ? Colors.white : colorScheme.textMuted,
- ),
- ),
- ),
- );
- }
-
Widget _getSortMenu() {
final textTheme = getEnteTextTheme(context);
final colorScheme = getEnteColorScheme(context);