Fixed wrong text bubble width with small messages

This commit is contained in:
Elias Müller 2024-02-12 13:57:30 +01:00
parent 9411bfa2dd
commit 7bd6042bbf

View File

@ -124,10 +124,7 @@ class _ChatBubbleState extends State<ChatBubble> {
maxWidth: MediaQuery.of(context).size.width * 0.9,
minWidth: showActorDisplayName ? _textSize(widget.bubbleData.actorDisplayName, actorTextStyle).width : 30,
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Stack(
child: Stack(
children: [
Padding(
padding: EdgeInsets.only(bottom: showBubbleTime ? 18 : 0, top: showActorDisplayName ? 18 : 0),
@ -141,6 +138,7 @@ class _ChatBubbleState extends State<ChatBubble> {
child: Text(
widget.bubbleData.actorDisplayName,
textAlign: TextAlign.start,
overflow: TextOverflow.ellipsis,
style: actorTextStyle,
),
),
@ -157,14 +155,17 @@ class _ChatBubbleState extends State<ChatBubble> {
),
),
),
],
),
Visibility(
visible: downloadProgress > 0,
child: LinearProgressIndicator(value: downloadProgress/100)
child: Positioned(
bottom: 0,
right: 0,
left: 0,
child: LinearProgressIndicator(value: downloadProgress/100),
),
),
],
)
),
),
),
onLongPress: () {