From 1bba8164f008baffb722c5b7afe15f7189d9beb7 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Mon, 31 May 2021 17:12:33 +0200 Subject: [PATCH] change: Minor color changes for chat list items --- lib/widgets/list_items/chat_list_item.dart | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/widgets/list_items/chat_list_item.dart b/lib/widgets/list_items/chat_list_item.dart index 7ea486bd..4edcb915 100644 --- a/lib/widgets/list_items/chat_list_item.dart +++ b/lib/widgets/list_items/chat_list_item.dart @@ -210,6 +210,16 @@ class ChatListItem extends StatelessWidget { ), SizedBox(width: 4), }, + if (typingText.isEmpty && + !ownMessage && + !room.isDirectChat && + room.lastEvent != null) + Text( + '${room.lastEvent.sender.calcDisplayname()}: ', + style: TextStyle( + color: Theme.of(context).textTheme.bodyText1.color, + ), + ), Expanded( child: typingText.isNotEmpty ? Text( @@ -230,8 +240,6 @@ class ChatListItem extends StatelessWidget { : Text( room.lastEvent?.getLocalizedBody( MatrixLocals(L10n.of(context)), - withSenderNamePrefix: - !ownMessage && !room.isDirectChat, hideReply: true, ) ?? '', @@ -239,6 +247,9 @@ class ChatListItem extends StatelessWidget { maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( + color: room.notificationCount > 0 + ? Theme.of(context).colorScheme.secondary + : null, decoration: room.lastEvent?.redacted == true ? TextDecoration.lineThrough : null,