From 2cdf85ac02ea0be0df5cabe5713a77a978ced4de Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 16 Jan 2026 09:24:12 -0600 Subject: [PATCH] fix: prevent image to change size when interacting --- .../src/controller/photo_view_controller_delegate.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/lib/widgets/photo_view/src/controller/photo_view_controller_delegate.dart b/mobile/lib/widgets/photo_view/src/controller/photo_view_controller_delegate.dart index 6825bf8ee1..6efbc32272 100644 --- a/mobile/lib/widgets/photo_view/src/controller/photo_view_controller_delegate.dart +++ b/mobile/lib/widgets/photo_view/src/controller/photo_view_controller_delegate.dart @@ -65,7 +65,9 @@ mixin PhotoViewControllerDelegate on State { double get scale { // for figuring out initial scale - final needsRecalc = markNeedsScaleRecalc && !scaleStateController.scaleState.isScaleStateZooming; + final isZooming = scaleStateController.scaleState.isScaleStateZooming; + final isUserInteracting = controller.position != Offset.zero; + final needsRecalc = markNeedsScaleRecalc && !isZooming && !isUserInteracting; final scaleExistsOnController = controller.scale != null; if (needsRecalc || !scaleExistsOnController) {