π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Remove comments, clean up, use better variable name, add comments
ashilkn5d6175050818
diff --git a/mobile/lib/ui/home/home_gallery_widget.dart b/mobile/lib/ui/home/home_gallery_widget.dartindex 366559cb8c..7de93e71e7 100644--- a/mobile/lib/ui/home/home_gallery_widget.dart+++ b/mobile/lib/ui/home/home_gallery_widget.dart@@ -87,7 +87,6 @@ class HomeGalleryWidget extends StatelessWidget {);return SelectionState(selectedFiles: selectedFiles,- // ignore: prefer_const_literals_to_create_immutableschild: Stack(alignment: Alignment.bottomCenter,children: [@@ -96,6 +95,5 @@ class HomeGalleryWidget extends StatelessWidget {],),);- // return gallery;}}diff --git a/mobile/lib/ui/viewer/actions/file_selection_overlay_bar.dart b/mobile/lib/ui/viewer/actions/file_selection_overlay_bar.dartindex 735459bf82..608286809c 100644--- a/mobile/lib/ui/viewer/actions/file_selection_overlay_bar.dart+++ b/mobile/lib/ui/viewer/actions/file_selection_overlay_bar.dart@@ -118,7 +118,7 @@ class SelectAllButton extends StatefulWidget {}class _SelectAllButtonState extends State<SelectAllButton> {- bool _selectAll = false;+ bool _allSelected = false;@overrideWidget build(BuildContext context) {final selectionState = SelectionState.of(context);@@ -130,13 +130,13 @@ class _SelectAllButtonState extends State<SelectAllButton> {return GestureDetector(onTap: () {setState(() {- if (_selectAll) {+ if (_allSelected) {selectionState.selectedFiles.clearAll();} else {selectionState.selectedFiles.selectAll(selectionState.allGalleryFiles!.toSet());}- _selectAll = !_selectAll;+ _allSelected = !_allSelected;});},child: Padding(@@ -168,15 +168,15 @@ class _SelectAllButtonState extends State<SelectAllButton> {builder: (context, _) {if (selectionState.selectedFiles.files.length ==selectionState.allGalleryFiles?.length) {- _selectAll = true;+ _allSelected = true;} else {- _selectAll = false;+ _allSelected = false;}return Icon(- _selectAll+ _allSelected? Icons.check_circle: Icons.check_circle_outline,- color: _selectAll ? null : colorScheme.strokeMuted,+ color: _allSelected ? null : colorScheme.strokeMuted,size: 18,);},diff --git a/mobile/lib/ui/viewer/gallery/gallery.dart b/mobile/lib/ui/viewer/gallery/gallery.dartindex 7af50e38f5..3155617060 100644--- a/mobile/lib/ui/viewer/gallery/gallery.dart+++ b/mobile/lib/ui/viewer/gallery/gallery.dart@@ -175,7 +175,7 @@ class GalleryState extends State<Gallery> {if (result.hasMore) {final result = await _loadFiles();_setFilesAndReload(result.files);- } else {}+ }});}diff --git a/mobile/lib/ui/viewer/gallery/state/selection_state.dart b/mobile/lib/ui/viewer/gallery/state/selection_state.dartindex 762b14b94a..ef97c884b1 100644--- a/mobile/lib/ui/viewer/gallery/state/selection_state.dart+++ b/mobile/lib/ui/viewer/gallery/state/selection_state.dart@@ -3,6 +3,8 @@ import "package:logging/logging.dart";import "package:photos/models/file/file.dart";import "package:photos/models/selected_files.dart";+///This is an inherited widget that needs to be wrapped around Gallery and+///FileSelectionOverlayBar to make select all work.// ignore: must_be_immutableclass SelectionState extends InheritedWidget {final SelectedFiles selectedFiles;