🐛 Fix attachment border in list

This commit is contained in:
LittleSheep 2025-03-26 00:29:00 +08:00
parent e6d732c86a
commit ecc79368a1

View File

@ -224,8 +224,10 @@ class _AttachmentListState extends State<AttachmentList> {
(widget.data[idx]?.data['ratio'] ?? 1).toDouble(), (widget.data[idx]?.data['ratio'] ?? 1).toDouble(),
child: GestureDetector( child: GestureDetector(
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
@ -246,8 +248,10 @@ class _AttachmentListState extends State<AttachmentList> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: backgroundColor, color: backgroundColor,
border: border: Border.all(
Border(top: borderSide, bottom: borderSide), width: 1,
color: Theme.of(context).dividerColor,
),
borderRadius: AttachmentList.kDefaultRadius, borderRadius: AttachmentList.kDefaultRadius,
), ),
child: ClipRRect( child: ClipRRect(
@ -263,8 +267,8 @@ class _AttachmentListState extends State<AttachmentList> {
right: 8, right: 8,
bottom: 8, bottom: 8,
child: Chip( child: Chip(
label: label: Text('${idx + 1}/${widget.data.length}'),
Text('${idx + 1}/${widget.data.length}')), ),
), ),
], ],
), ),