Skip to content

armgit / ente

Public Imported from GitHub
0

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

Updated: Even if the image is not stored locally, vertical drag works

Muhammed Ayimen1307358934c2
diff --git a/lib/ui/viewer/file/zoomable_image.dart b/lib/ui/viewer/file/zoomable_image.dart
index 12e607927b..c3f7aef30f 100644
--- a/lib/ui/viewer/file/zoomable_image.dart
+++ b/lib/ui/viewer/file/zoomable_image.dart
@@ -100,19 +100,26 @@ class _ZoomableImageState extends State<ZoomableImage>
content = const EnteLoadingWidget();
}
- verticalDragCallback(d) => {
- if (_photoViewController.scale! <= _initialScale!)
+ dragFunction(d) => {
+ if (d.delta.dy > dragSensitivity)
{
- if (d.delta.dy > dragSensitivity)
- {
- {Navigator.of(context).pop()},
- }
- else if (d.delta.dy < (dragSensitivity * -1))
- {
- showDetailsSheet(context, widget.photo),
- },
+ {Navigator.of(context).pop()},
+ }
+ else if (d.delta.dy < (dragSensitivity * -1))
+ {
+ showDetailsSheet(context, widget.photo),
},
};
+
+ verticalDragCallback(d) {
+ if (_initialScale != null &&
+ _photoViewController.scale! <= _initialScale!) {
+ dragFunction(d);
+ } else if (_initialScale == null) {
+ dragFunction(d);
+ }
+ }
+
return GestureDetector(
onVerticalDragUpdate: verticalDragCallback,
child: content,