✨ Add max height to attachments
This commit is contained in:
parent
156e6f1075
commit
df7348e117
@ -1,5 +1,3 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:solian/models/event.dart';
|
||||
@ -25,9 +23,13 @@ class ChatEventMessage extends StatelessWidget {
|
||||
Widget buildAttachment(BuildContext context) {
|
||||
final body = EventMessageBody.fromJson(item.body);
|
||||
|
||||
return SizedBox(
|
||||
return Container(
|
||||
key: Key('m${item.uuid}attachments-box'),
|
||||
width: min(MediaQuery.of(context).size.width, 640),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
constraints: const BoxConstraints(
|
||||
maxHeight: 720,
|
||||
maxWidth: 640,
|
||||
),
|
||||
child: AttachmentList(
|
||||
key: Key('m${item.uuid}attachments'),
|
||||
parentId: item.uuid,
|
||||
|
@ -270,10 +270,17 @@ class _PostItemState extends State<PostItem> {
|
||||
right: 16,
|
||||
left: 16,
|
||||
),
|
||||
AttachmentList(
|
||||
parentId: widget.item.alias,
|
||||
attachmentsId: item.attachments ?? List.empty(),
|
||||
divided: true,
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
constraints: const BoxConstraints(
|
||||
maxHeight: 720,
|
||||
maxWidth: 640,
|
||||
),
|
||||
child: AttachmentList(
|
||||
parentId: widget.item.alias,
|
||||
attachmentsId: item.attachments ?? List.empty(),
|
||||
divided: true,
|
||||
),
|
||||
),
|
||||
if (widget.isShowReply && widget.isReactable)
|
||||
PostQuickAction(
|
||||
|
Loading…
Reference in New Issue
Block a user