Skip to content

armgit / ente

Public Imported from GitHub
0

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

Refactor selection check to improve readability and consistency

AmanRajSinghMourya7e9ad13b470a
diff --git a/mobile/apps/locker/lib/ui/viewer/actions/file_selection_overlay_bar.dart b/mobile/apps/locker/lib/ui/viewer/actions/file_selection_overlay_bar.dart
index af0c3ba35b..c2dcda1865 100644
--- a/mobile/apps/locker/lib/ui/viewer/actions/file_selection_overlay_bar.dart
+++ b/mobile/apps/locker/lib/ui/viewer/actions/file_selection_overlay_bar.dart
@@ -50,7 +50,7 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {
double _lastScrollPosition = 0;
int _previousSelectionCount = 0;
- bool get _hasSelection => widget.selectedFiles.files.isNotEmpty;
+ bool get hasSelection => widget.selectedFiles.files.isNotEmpty;
List<EnteFile> _getOwnedFiles(List<EnteFile> files) {
final currentUserID = Configuration.instance.getUserID();
@@ -99,7 +99,7 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {
void _onScroll() {
final controller = widget.scrollController;
- if (!mounted || controller == null || !_hasSelection) return;
+ if (!mounted || controller == null || !hasSelection) return;
final position = controller.position;
final current = position.pixels;
@@ -124,7 +124,6 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {
final bottomPadding = MediaQuery.of(context).padding.bottom;
final colorScheme = getEnteColorScheme(context);
final textTheme = getEnteTextTheme(context);
- final hasSelection = widget.selectedFiles.files.isNotEmpty;
return IgnorePointer(
ignoring: !hasSelection,
@@ -161,7 +160,6 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {
top: BorderSide(color: colorScheme.strokeFaint),
),
),
- margin: EdgeInsets.zero,
child: Padding(
padding: EdgeInsets.fromLTRB(16, 16, 16, bottomPadding),
child: Column(