mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00: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
1 changed files with 30 additions and 6 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue