mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 13:09:24 +01:00
fix: Sendername prefix
This commit is contained in:
parent
418a4e2397
commit
8aaff6fbbe
@ -132,6 +132,8 @@ class ChatListItem extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final isMuted = room.pushRuleState != PushRuleState.notify;
|
final isMuted = room.pushRuleState != PushRuleState.notify;
|
||||||
final typingText = room.getLocalizedTypingText(context);
|
final typingText = room.getLocalizedTypingText(context);
|
||||||
|
final ownMessage =
|
||||||
|
room.lastEvent?.senderId == Matrix.of(context).client.userID;
|
||||||
return Center(
|
return Center(
|
||||||
child: Material(
|
child: Material(
|
||||||
color: chatListItemColor(context, activeChat, selected),
|
color: chatListItemColor(context, activeChat, selected),
|
||||||
@ -196,9 +198,7 @@ class ChatListItem extends StatelessWidget {
|
|||||||
subtitle: Row(
|
subtitle: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (room.typingUsers.isEmpty &&
|
if (room.typingUsers.isEmpty && ownMessage) ...{
|
||||||
room.lastEvent?.senderId ==
|
|
||||||
Matrix.of(context).client.userID) ...{
|
|
||||||
Icon(
|
Icon(
|
||||||
room.lastEvent.statusIcon,
|
room.lastEvent.statusIcon,
|
||||||
size: 14,
|
size: 14,
|
||||||
@ -225,6 +225,7 @@ class ChatListItem extends StatelessWidget {
|
|||||||
: Text(
|
: Text(
|
||||||
room.lastEvent?.getLocalizedBody(
|
room.lastEvent?.getLocalizedBody(
|
||||||
MatrixLocals(L10n.of(context)),
|
MatrixLocals(L10n.of(context)),
|
||||||
|
withSenderNamePrefix: !ownMessage,
|
||||||
hideReply: true,
|
hideReply: true,
|
||||||
) ??
|
) ??
|
||||||
'',
|
'',
|
||||||
|
Loading…
Reference in New Issue
Block a user