diff --git a/lib/widgets/chat/chat_event.dart b/lib/widgets/chat/chat_event.dart index 2f127b3..75f26e5 100644 --- a/lib/widgets/chat/chat_event.dart +++ b/lib/widgets/chat/chat_event.dart @@ -50,10 +50,10 @@ class ChatEvent extends StatelessWidget { return Row( children: [ Icon( - Icons.attachment, - size: 18, + Icons.file_copy, + size: 15, color: unFocusColor, - ).paddingOnly(right: 6), + ).paddingOnly(right: 5), Text( 'attachmentHint'.trParams( {'count': attachments.length.toString()}, @@ -221,6 +221,8 @@ class ChatEvent extends StatelessWidget { ], ), _buildContent().paddingOnly(left: 0.5), + _buildAttachment(context, isMinimal: true) + .paddingOnly(left: 0), ], ), ), diff --git a/lib/widgets/chat/chat_event_action_log.dart b/lib/widgets/chat/chat_event_action_log.dart index 913a132..f3e6ec4 100644 --- a/lib/widgets/chat/chat_event_action_log.dart +++ b/lib/widgets/chat/chat_event_action_log.dart @@ -31,7 +31,11 @@ class ChatEventMessageActionLog extends StatelessWidget { ).paddingOnly( left: isQuote ? 0 : (isMerged ? 64 : 12), top: 2, - bottom: isHasMerged ? 2 : 0, + bottom: isQuote + ? 0 + : isHasMerged + ? 2 + : 0, ), ); } diff --git a/lib/widgets/chat/chat_event_message.dart b/lib/widgets/chat/chat_event_message.dart index 5e0764d..1fb0097 100644 --- a/lib/widgets/chat/chat_event_message.dart +++ b/lib/widgets/chat/chat_event_message.dart @@ -67,7 +67,9 @@ class ChatEventMessage extends StatelessWidget { left: isQuote ? 0 : 12, right: isQuote ? 0 : 12, top: body.quoteEvent == null ? 2 : 0, - bottom: hasAttachment && !isContentPreviewing ? 4 : (isHasMerged ? 2 : 0), + bottom: hasAttachment && !isContentPreviewing && !isQuote + ? 4 + : (isHasMerged ? 2 : 0), ); } } diff --git a/lib/widgets/chat/chat_message_input.dart b/lib/widgets/chat/chat_message_input.dart index 7a271a6..4169ac7 100644 --- a/lib/widgets/chat/chat_message_input.dart +++ b/lib/widgets/chat/chat_message_input.dart @@ -208,6 +208,8 @@ class _ChatMessageInputState extends State { final body = EventMessageBody.fromJson(widget.edit!.body); _editTo = widget.edit!; _textController.text = body.text; + _attachments.addAll( + widget.edit!.body['attachments']?.cast() ?? List.empty()); } if (widget.reply != null) { _replyTo = widget.reply!; diff --git a/lib/widgets/posts/post_item.dart b/lib/widgets/posts/post_item.dart index 5e9e357..b56dff9 100644 --- a/lib/widgets/posts/post_item.dart +++ b/lib/widgets/posts/post_item.dart @@ -335,10 +335,10 @@ class _PostItemState extends State { Row( children: [ Icon( - Icons.attachment, - size: 18, + Icons.file_copy, + size: 15, color: _unFocusColor, - ).paddingOnly(right: 6), + ).paddingOnly(right: 5), Text( 'attachmentHint'.trParams( {'count': attachments.length.toString()}, @@ -440,7 +440,7 @@ class _PostItemState extends State { attachmentsId: attachments, isGrid: attachments.length > 1, ), - if (widget.isShowReply && widget.isReactable) + if (widget.isShowReply || widget.isReactable) PostQuickAction( isShowReply: widget.isShowReply, isReactable: widget.isReactable,