🐛 Fix attachments

This commit is contained in:
LittleSheep 2025-03-08 19:19:06 +08:00
parent a4f6e8af56
commit e16bc80eea
2 changed files with 5 additions and 2 deletions

View File

@ -143,8 +143,10 @@ class _AttachmentListState extends State<AttachmentList> {
),
),
onTap: () {
if (widget.data[idx]!.mediaType != SnMediaType.image)
if (widget.data[idx]!.mediaType !=
SnMediaType.image) {
return;
}
context.pushTransparentRoute(
AttachmentZoomView(
data: widget.data
@ -203,6 +205,7 @@ class _AttachmentListState extends State<AttachmentList> {
return Container(
constraints: BoxConstraints(maxHeight: constraints.maxHeight),
width: double.infinity,
child: AspectRatio(
aspectRatio: widget.data[0]?.data['ratio']?.toDouble() ?? 1,
child: ScrollConfiguration(

View File

@ -157,7 +157,7 @@ class _AttachmentZoomViewState extends State<AttachmentZoomView> {
Navigator.of(context).pop();
},
direction: _dismissable
? DismissiblePageDismissDirection.multi
? DismissiblePageDismissDirection.down
: DismissiblePageDismissDirection.none,
backgroundColor: Colors.transparent,
isFullScreen: true,