diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart index 84fdcf85f1..0934536471 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart @@ -319,11 +319,9 @@ class _AssetPageState extends ConsumerState { return PhotoView.customChild( key: Key(asset.heroTag), - childSize: - _viewController?.scaleBoundaries?.childSize ?? - (asset.width != null && asset.height != null - ? Size(asset.width!.toDouble(), asset.height!.toDouble()) - : null), + childSize: asset.width != null && asset.height != null + ? Size(asset.width!.toDouble(), asset.height!.toDouble()) + : null, onDragStart: _onDragStart, onDragUpdate: _onDragUpdate, onDragEnd: _onDragEnd, diff --git a/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart b/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart index 1496ccc3d1..36e7c0411e 100644 --- a/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart +++ b/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart @@ -1,4 +1,5 @@ import 'package:flutter/widgets.dart'; +import 'package:immich_mobile/utils/debug_print.dart'; import 'package:immich_mobile/widgets/photo_view/photo_view.dart'; import 'package:immich_mobile/widgets/photo_view/src/core/photo_view_core.dart'; import 'package:immich_mobile/widgets/photo_view/src/photo_view_default_widgets.dart'; @@ -145,15 +146,6 @@ class _ImageWrapperState extends State { _lastStack = null; _didLoadSynchronously = synchronousCall; - final oldBoundaries = widget.controller.scaleBoundaries; - widget.controller.scaleBoundaries = scaleBoundaries; - if (oldBoundaries != null) { - final ratio = scaleBoundaries.initialScale / oldBoundaries.initialScale; - final currentScale = widget.controller.scale; - if (currentScale != null) { - widget.controller.setScaleInvisibly(currentScale * ratio); - } - } } synchronousCall && !_didLoadSynchronously ? setupCB() : setState(setupCB);