mirror of
https://github.com/immich-app/immich.git
synced 2025-08-30 23:02:39 -04:00
fix(mobile): allow gestures in asset viewer before image is loaded (#21354)
* allow gestures while loading * disable zoom
This commit is contained in:
parent
1298a74230
commit
227789225a
@ -172,12 +172,36 @@ class _ImageWrapperState extends State<ImageWrapper> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (_loading) {
|
||||
return _buildLoading(context);
|
||||
}
|
||||
|
||||
if (_lastException != null) {
|
||||
return _buildError(context);
|
||||
if (_loading || _lastException != null) {
|
||||
return CustomChildWrapper(
|
||||
childSize: null,
|
||||
backgroundDecoration: widget.backgroundDecoration,
|
||||
heroAttributes: widget.heroAttributes,
|
||||
scaleStateChangedCallback: widget.scaleStateChangedCallback,
|
||||
enableRotation: widget.enableRotation,
|
||||
controller: widget.controller,
|
||||
scaleStateController: widget.scaleStateController,
|
||||
maxScale: widget.maxScale,
|
||||
minScale: widget.minScale,
|
||||
initialScale: widget.initialScale,
|
||||
basePosition: widget.basePosition,
|
||||
scaleStateCycle: widget.scaleStateCycle,
|
||||
onTapUp: widget.onTapUp,
|
||||
onTapDown: widget.onTapDown,
|
||||
onDragStart: widget.onDragStart,
|
||||
onDragEnd: widget.onDragEnd,
|
||||
onDragUpdate: widget.onDragUpdate,
|
||||
onScaleEnd: widget.onScaleEnd,
|
||||
onLongPressStart: widget.onLongPressStart,
|
||||
outerSize: widget.outerSize,
|
||||
gestureDetectorBehavior: widget.gestureDetectorBehavior,
|
||||
tightMode: widget.tightMode,
|
||||
filterQuality: widget.filterQuality,
|
||||
disableGestures: widget.disableGestures,
|
||||
disableScaleGestures: true,
|
||||
enablePanAlways: widget.enablePanAlways,
|
||||
child: _loading ? _buildLoading(context) : _buildError(context),
|
||||
);
|
||||
}
|
||||
|
||||
final scaleBoundaries = ScaleBoundaries(
|
||||
|
Loading…
x
Reference in New Issue
Block a user