fix(ui): fix message widget thread indicator
This commit is contained in:
@@ -909,7 +909,7 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
|
|||||||
const usernameKey = Key('username');
|
const usernameKey = Key('username');
|
||||||
|
|
||||||
children.addAll([
|
children.addAll([
|
||||||
if (showUsername) _buildUsername(usernameKey),
|
if (showUsername) Flexible(child: _buildUsername(usernameKey)),
|
||||||
if (showTimeStamp)
|
if (showTimeStamp)
|
||||||
Text(
|
Text(
|
||||||
Jiffy(widget.message.createdAt.toLocal()).jm,
|
Jiffy(widget.message.createdAt.toLocal()).jm,
|
||||||
@@ -955,21 +955,9 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
|
|||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
widget.reverse ? MainAxisAlignment.end : MainAxisAlignment.start,
|
widget.reverse ? MainAxisAlignment.end : MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (showThreadTail && !widget.reverse) ...threadIndicatorWidgets,
|
if (!widget.reverse) ...threadIndicatorWidgets,
|
||||||
...children.map(
|
...children,
|
||||||
(child) {
|
if (widget.reverse) ...threadIndicatorWidgets.reversed,
|
||||||
Widget mappedChild = SizedBox(
|
|
||||||
height: context.textScaleFactor * 14,
|
|
||||||
child: child,
|
|
||||||
);
|
|
||||||
if (child.key == usernameKey) {
|
|
||||||
mappedChild = Flexible(child: mappedChild);
|
|
||||||
}
|
|
||||||
return mappedChild;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
if (showThreadTail && widget.reverse)
|
|
||||||
...threadIndicatorWidgets.reversed,
|
|
||||||
].insertBetween(const SizedBox(width: 8)),
|
].insertBetween(const SizedBox(width: 8)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user