revert fixes

This commit is contained in:
LeLunZ 2026-04-21 18:10:12 +02:00
parent 48b3b3caba
commit 4bd3d6054e
2 changed files with 4 additions and 14 deletions

View File

@ -319,11 +319,9 @@ class _AssetPageState extends ConsumerState<AssetPage> {
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,

View File

@ -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<ImageWrapper> {
_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);