π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Disable scroll jump for single group delete
laurenspriem92b83a578f05
diff --git a/mobile/apps/photos/lib/ui/tools/similar_images_page.dart b/mobile/apps/photos/lib/ui/tools/similar_images_page.dartindex 098292a868..b4dc1c9123 100644--- a/mobile/apps/photos/lib/ui/tools/similar_images_page.dart+++ b/mobile/apps/photos/lib/ui/tools/similar_images_page.dart@@ -939,6 +939,7 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>files,showDialog: showDialog,showUIFeedback: false,+ maintainScrollAnchor: false,);},child: Container(@@ -972,6 +973,7 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>Set<EnteFile> filesToDelete, {bool showDialog = true,bool showUIFeedback = true,+ bool maintainScrollAnchor = true,}) async {if (filesToDelete.isEmpty) return;if (showDialog) {@@ -987,6 +989,7 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>filesToDelete,true,showUIFeedback: showUIFeedback,+ maintainScrollAnchor: maintainScrollAnchor,);} catch (e, s) {_logger.severe("Failed to delete files", e, s);@@ -1001,6 +1004,7 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>filesToDelete,true,showUIFeedback: showUIFeedback,+ maintainScrollAnchor: maintainScrollAnchor,);}}@@ -1009,12 +1013,13 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>Set<EnteFile> filesToDelete,bool createSymlink, {bool showUIFeedback = true,+ bool maintainScrollAnchor = true,}) async {if (filesToDelete.isEmpty) {return;}SimilarFiles? anchorGroup;- {+ if (maintainScrollAnchor) {final beforeFiltered = _filteredGroups;final plannedDeletes = Set<EnteFile>.from(filesToDelete);final topIndex = _getTopMostVisibleIndex();@@ -1143,7 +1148,9 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>_selectedFiles.unSelectAll(allDeleteFiles);setState(() {});- if (anchorGroup != null && _itemScrollController.isAttached) {+ if (maintainScrollAnchor &&+ anchorGroup != null &&+ _itemScrollController.isAttached) {WidgetsBinding.instance.addPostFrameCallback((_) {final afterFiltered = _filteredGroups;final newIndex =