Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mobile][photos] Fix the selection action scrollbar

r4khulb35b70026d58
diff --git a/mobile/apps/photos/changes/selection-actions-scrollbar.md b/mobile/apps/photos/changes/selection-actions-scrollbar.md
new file mode 100644
index 0000000000..90c8268847
--- /dev/null
+++ b/mobile/apps/photos/changes/selection-actions-scrollbar.md
@@ -0,0 +1 @@
+- Fixed the scroll indicator in photo selection actions.
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
index cd5cc523a4..6a8ff77b38 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
@@ -95,6 +95,7 @@ class _FileSelectionActionsWidgetState
final GlobalKey sendLinkButtonKey = GlobalKey();
final StreamController<double> _progressController =
StreamController<double>();
+ final ScrollController _scrollController = ScrollController();
bool get _canRemoveOthersFiles =>
widget.collection != null &&
@@ -118,6 +119,7 @@ class _FileSelectionActionsWidgetState
@override
void dispose() {
_progressController.close();
+ _scrollController.dispose();
widget.selectedFiles.removeListener(_selectFileChangeListener);
super.dispose();
}
@@ -568,7 +570,6 @@ class _FileSelectionActionsWidgetState
}
if (items.isNotEmpty) {
- final scrollController = ScrollController();
// h4ck: https://github.com/flutter/flutter/issues/57920#issuecomment-893970066
return MediaQuery(
data: MediaQuery.of(context).removePadding(removeBottom: true),
@@ -577,9 +578,10 @@ class _FileSelectionActionsWidgetState
child: Scrollbar(
radius: const Radius.circular(1),
thickness: 2,
- controller: scrollController,
+ controller: _scrollController,
thumbVisibility: true,
child: SingleChildScrollView(
+ controller: _scrollController,
physics: const BouncingScrollPhysics(
decelerationRate: ScrollDecelerationRate.fast,
),