mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 09:15:34 +03:00
fix(mobile): allow gestures in asset viewer before image is loaded (#21354)
* allow gestures while loading * disable zoom
This commit is contained in:
@@ -172,12 +172,36 @@ class _ImageWrapperState extends State<ImageWrapper> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (_loading) {
|
if (_loading || _lastException != null) {
|
||||||
return _buildLoading(context);
|
return CustomChildWrapper(
|
||||||
}
|
childSize: null,
|
||||||
|
backgroundDecoration: widget.backgroundDecoration,
|
||||||
if (_lastException != null) {
|
heroAttributes: widget.heroAttributes,
|
||||||
return _buildError(context);
|
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(
|
final scaleBoundaries = ScaleBoundaries(
|
||||||
|
|||||||
Reference in New Issue
Block a user