🐛 Fix attachments
This commit is contained in:
parent
a4f6e8af56
commit
e16bc80eea
@ -143,8 +143,10 @@ class _AttachmentListState extends State<AttachmentList> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (widget.data[idx]!.mediaType != SnMediaType.image)
|
if (widget.data[idx]!.mediaType !=
|
||||||
|
SnMediaType.image) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
context.pushTransparentRoute(
|
context.pushTransparentRoute(
|
||||||
AttachmentZoomView(
|
AttachmentZoomView(
|
||||||
data: widget.data
|
data: widget.data
|
||||||
@ -203,6 +205,7 @@ class _AttachmentListState extends State<AttachmentList> {
|
|||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
constraints: BoxConstraints(maxHeight: constraints.maxHeight),
|
constraints: BoxConstraints(maxHeight: constraints.maxHeight),
|
||||||
|
width: double.infinity,
|
||||||
child: AspectRatio(
|
child: AspectRatio(
|
||||||
aspectRatio: widget.data[0]?.data['ratio']?.toDouble() ?? 1,
|
aspectRatio: widget.data[0]?.data['ratio']?.toDouble() ?? 1,
|
||||||
child: ScrollConfiguration(
|
child: ScrollConfiguration(
|
||||||
|
@ -157,7 +157,7 @@ class _AttachmentZoomViewState extends State<AttachmentZoomView> {
|
|||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
direction: _dismissable
|
direction: _dismissable
|
||||||
? DismissiblePageDismissDirection.multi
|
? DismissiblePageDismissDirection.down
|
||||||
: DismissiblePageDismissDirection.none,
|
: DismissiblePageDismissDirection.none,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
isFullScreen: true,
|
isFullScreen: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user