diff --git a/lib/ui/detail_page.dart b/lib/ui/detail_page.dart index 26cafcf68..57b07345d 100644 --- a/lib/ui/detail_page.dart +++ b/lib/ui/detail_page.dart @@ -141,9 +141,11 @@ class _DetailPageState extends State { autoPlay: !_hasPageChanged, tagPrefix: widget.config.tagPrefix, shouldDisableScroll: (value) { - setState(() { - _shouldDisableScroll = value; - }); + if (_shouldDisableScroll != value) { + setState(() { + _shouldDisableScroll = value; + }); + } }, playbackCallback: (isPlaying) { _shouldHideAppBar = isPlaying; diff --git a/lib/ui/zoomable_image.dart b/lib/ui/zoomable_image.dart index b4075e22e..ef22c973c 100644 --- a/lib/ui/zoomable_image.dart +++ b/lib/ui/zoomable_image.dart @@ -48,11 +48,13 @@ class _ZoomableImageState extends State @override void initState() { _photo = widget.photo; + debugPrint('initState for ${_photo.toString()}'); _scaleStateChangedCallback = (value) { if (widget.shouldDisableScroll != null) { widget.shouldDisableScroll(value != PhotoViewScaleState.initial); } _isZooming = value != PhotoViewScaleState.initial; + debugPrint("isZooming = $_isZooming, currentState $value"); // _logger.info('is reakky zooming $_isZooming with state $value'); }; super.initState(); @@ -68,15 +70,18 @@ class _ZoomableImageState extends State Widget content; if (_imageProvider != null) { - content = PhotoView( - imageProvider: _imageProvider, - scaleStateChangedCallback: _scaleStateChangedCallback, - minScale: PhotoViewComputedScale.contained, - gaplessPlayback: true, - heroAttributes: PhotoViewHeroAttributes( - tag: widget.tagPrefix + _photo.tag(), + content = PhotoViewGestureDetectorScope( + axis: Axis.vertical, + child: PhotoView( + imageProvider: _imageProvider, + scaleStateChangedCallback: _scaleStateChangedCallback, + minScale: PhotoViewComputedScale.contained, + gaplessPlayback: true, + heroAttributes: PhotoViewHeroAttributes( + tag: widget.tagPrefix + _photo.tag(), + ), + backgroundDecoration: widget.backgroundDecoration, ), - backgroundDecoration: widget.backgroundDecoration, ); } else { content = loadWidget; diff --git a/pubspec.yaml b/pubspec.yaml index e503556e1..4b12c4252 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: ente photos application # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 0.6.7+337 +version: 0.6.8+338 environment: sdk: ">=2.10.0 <3.0.0"