diff --git a/packages/stream_chat_flutter/lib/src/message_widget.dart b/packages/stream_chat_flutter/lib/src/message_widget.dart index 5c35ee8a..03020a5b 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget.dart @@ -926,7 +926,7 @@ class _StreamMessageWidgetState extends State final showThreadTail = !(hasUrlAttachments || isGiphy || isOnlyEmoji) && (showThreadReplyIndicator || showInChannel); - final threadIndicatorWidgets = [ + final threadIndicatorWidgets = [ if (showThreadTail) WidgetSpan( child: Container( @@ -961,12 +961,16 @@ class _StreamMessageWidgetState extends State ], ]; + if (widget.reverse) { + children.addAll(threadIndicatorWidgets.reversed); + } else { + children.insertAll(0, threadIndicatorWidgets); + } + return Text.rich( TextSpan( children: [ - if (!widget.reverse) ...threadIndicatorWidgets, ...children, - if (widget.reverse) ...threadIndicatorWidgets.reversed, ].insertBetween(const WidgetSpan(child: SizedBox(width: 8))), ), maxLines: 1,