[MessageWidget] Fix attachment padding and border sides

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-01-13 15:09:28 +05:30
parent 987f6991fe
commit 3432b7c5ee
3 changed files with 45 additions and 51 deletions
+6 -3
View File
@@ -815,7 +815,9 @@ class _MessageListViewState extends State<MessageListView> {
message.attachments?.any((it) => it.ogScrapeUrl != null) == true;
final borderSide =
isOnlyEmoji || hasUrlAttachment || isMyMessage ? BorderSide.none : null;
isOnlyEmoji || hasUrlAttachment || (isMyMessage && !hasFileAttachment)
? BorderSide.none
: null;
Widget child = MessageWidget(
key: ValueKey<String>('MESSAGE-${message.id}'),
@@ -859,14 +861,15 @@ class _MessageListViewState extends State<MessageListView> {
attachmentBorderRadiusGeometry: BorderRadius.only(
topLeft: Radius.circular(attachmentBorderRadius),
bottomLeft: Radius.circular(
(timeDiff >= 1 || !isNextUserSame) && !(hasReplies || isThreadMessage)
(timeDiff >= 1 || !isNextUserSame) &&
!(hasReplies || isThreadMessage || hasFileAttachment)
? 0
: attachmentBorderRadius,
),
topRight: Radius.circular(attachmentBorderRadius),
bottomRight: Radius.circular(attachmentBorderRadius),
),
attachmentPadding: const EdgeInsets.all(2),
attachmentPadding: EdgeInsets.all(hasFileAttachment ? 4 : 2),
borderRadiusGeometry: BorderRadius.only(
topLeft: Radius.circular(16),
bottomLeft: Radius.circular(