Skip to content

armgit / ente

Public Imported from GitHub
0

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

Stabilize library sharing sheet scrolling

Neeraj Gupta080de6a3729c
diff --git a/mobile/apps/photos/lib/ui/sharing/library_sharing/library_sharing_page.dart b/mobile/apps/photos/lib/ui/sharing/library_sharing/library_sharing_page.dart
index 0fcf065e90..f6afa7900f 100644
--- a/mobile/apps/photos/lib/ui/sharing/library_sharing/library_sharing_page.dart
+++ b/mobile/apps/photos/lib/ui/sharing/library_sharing/library_sharing_page.dart
@@ -287,17 +287,17 @@ class _LibrarySharingPageState extends State<LibrarySharingPage> {
}
bool _handleScroll(ScrollNotification notification) {
- if (!_showSelectionSheet ||
- _controller.isMutating ||
- notification.depth != 0 ||
- notification.metrics.axis != Axis.vertical) {
+ if (notification.depth != 0 || notification.metrics.axis != Axis.vertical) {
return false;
}
if (notification is ScrollEndNotification) {
_selectionSheetScrollDistance = 0;
return false;
}
- if (notification is! ScrollUpdateNotification ||
+ if (!_showSelectionSheet ||
+ _controller.isMutating ||
+ notification is! ScrollUpdateNotification ||
+ notification.dragDetails == null ||
notification.scrollDelta == null) {
return false;
}
@@ -306,6 +306,11 @@ class _LibrarySharingPageState extends State<LibrarySharingPage> {
if (scrollDelta == 0) {
return false;
}
+ if (_isSelectionSheetExpanded && scrollDelta > 0) {
+ _selectionSheetScrollDistance = 0;
+ _setSelectionSheetExpanded(false);
+ return false;
+ }
if (scrollDelta.sign != _selectionSheetScrollDistance.sign) {
_selectionSheetScrollDistance = 0;
}