[MessageListView] Fix attachment corner radius
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -759,6 +759,11 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
final isThreadMessage =
|
final isThreadMessage =
|
||||||
widget.parentMessage != null || message?.showInChannel == true;
|
widget.parentMessage != null || message?.showInChannel == true;
|
||||||
|
|
||||||
|
final hasFileAttachment =
|
||||||
|
message.attachments.any((it) => it.type == 'file');
|
||||||
|
|
||||||
|
final attachmentBorderRadius = hasFileAttachment ? 12.0 : 14.0;
|
||||||
|
|
||||||
Widget child = MessageWidget(
|
Widget child = MessageWidget(
|
||||||
key: ValueKey<String>('MESSAGE-${message.id}'),
|
key: ValueKey<String>('MESSAGE-${message.id}'),
|
||||||
message: message,
|
message: message,
|
||||||
@@ -804,10 +809,10 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
onThreadTap: _onThreadTap,
|
onThreadTap: _onThreadTap,
|
||||||
onReplyTap: widget.onReplyTap,
|
onReplyTap: widget.onReplyTap,
|
||||||
attachmentBorderRadiusGeometry: BorderRadius.only(
|
attachmentBorderRadiusGeometry: BorderRadius.only(
|
||||||
topLeft: Radius.circular(16),
|
topLeft: Radius.circular(attachmentBorderRadius),
|
||||||
bottomLeft: Radius.circular(!isNextUser ? 0 : 16),
|
bottomLeft: Radius.circular(!isNextUser ? 0 : attachmentBorderRadius),
|
||||||
topRight: Radius.circular(16),
|
topRight: Radius.circular(attachmentBorderRadius),
|
||||||
bottomRight: Radius.circular(16),
|
bottomRight: Radius.circular(attachmentBorderRadius),
|
||||||
),
|
),
|
||||||
attachmentPadding: const EdgeInsets.all(2),
|
attachmentPadding: const EdgeInsets.all(2),
|
||||||
borderRadiusGeometry: BorderRadius.only(
|
borderRadiusGeometry: BorderRadius.only(
|
||||||
|
|||||||
Reference in New Issue
Block a user