minor fixes
This commit is contained in:
@@ -432,6 +432,7 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
physics: widget.scrollPhysics,
|
physics: widget.scrollPhysics,
|
||||||
itemScrollController: _scrollController,
|
itemScrollController: _scrollController,
|
||||||
reverse: true,
|
reverse: true,
|
||||||
|
addAutomaticKeepAlives: false,
|
||||||
itemCount:
|
itemCount:
|
||||||
messages.length + 2 + (_isThreadConversation ? 1 : 0),
|
messages.length + 2 + (_isThreadConversation ? 1 : 0),
|
||||||
separatorBuilder: (context, i) {
|
separatorBuilder: (context, i) {
|
||||||
|
|||||||
@@ -449,10 +449,8 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
final leftPadding =
|
final leftPadding =
|
||||||
widget.showUserAvatar != DisplayWidget.gone ? avatarWidth + 8.5 : 0.5;
|
widget.showUserAvatar != DisplayWidget.gone ? avatarWidth + 8.5 : 0.5;
|
||||||
|
|
||||||
return Material(
|
return Portal(
|
||||||
type: MaterialType.transparency,
|
child: GestureDetector(
|
||||||
child: Portal(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
widget.onMessageTap!(widget.message);
|
widget.onMessageTap!(widget.message);
|
||||||
},
|
},
|
||||||
@@ -499,8 +497,8 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
portal: Container(
|
portal: Container(
|
||||||
transform: Matrix4.translationValues(
|
transform: Matrix4.translationValues(
|
||||||
widget.reverse ? 12 : -12, 0, 0),
|
widget.reverse ? 12 : -12, 0, 0),
|
||||||
constraints: const BoxConstraints(
|
constraints:
|
||||||
maxWidth: 22 * 6.0),
|
const BoxConstraints(maxWidth: 22 * 6.0),
|
||||||
child: _buildReactionIndicator(context),
|
child: _buildReactionIndicator(context),
|
||||||
),
|
),
|
||||||
portalAnchor:
|
portalAnchor:
|
||||||
@@ -513,9 +511,7 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
Padding(
|
Padding(
|
||||||
padding: widget.showReactions
|
padding: widget.showReactions
|
||||||
? EdgeInsets.only(
|
? EdgeInsets.only(
|
||||||
top: widget
|
top: widget.message.reactionCounts
|
||||||
.message
|
|
||||||
.reactionCounts
|
|
||||||
?.isNotEmpty ==
|
?.isNotEmpty ==
|
||||||
true
|
true
|
||||||
? 18
|
? 18
|
||||||
@@ -531,13 +527,12 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
// ignore: lines_longer_than_80_chars
|
// ignore: lines_longer_than_80_chars
|
||||||
widget.showUserAvatar ==
|
widget.showUserAvatar ==
|
||||||
// ignore: lines_longer_than_80_chars
|
// ignore: lines_longer_than_80_chars
|
||||||
DisplayWidget
|
DisplayWidget.gone
|
||||||
.gone
|
|
||||||
? 0
|
? 0
|
||||||
: 4.0),
|
: 4.0),
|
||||||
child: DeletedMessage(
|
child: DeletedMessage(
|
||||||
borderRadiusGeometry: widget
|
borderRadiusGeometry:
|
||||||
.borderRadiusGeometry,
|
widget.borderRadiusGeometry,
|
||||||
borderSide: widget.borderSide,
|
borderSide: widget.borderSide,
|
||||||
shape: widget.shape,
|
shape: widget.shape,
|
||||||
messageTheme:
|
messageTheme:
|
||||||
@@ -577,8 +572,7 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.end,
|
CrossAxisAlignment.end,
|
||||||
mainAxisSize:
|
mainAxisSize: MainAxisSize.min,
|
||||||
MainAxisSize.min,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (hasQuotedMessage)
|
if (hasQuotedMessage)
|
||||||
_buildQuotedMessage(),
|
_buildQuotedMessage(),
|
||||||
@@ -635,7 +629,6 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user