change: Minor color changes for chat list items

This commit is contained in:
Christian Pauly 2021-05-31 17:12:33 +02:00
parent b92754a834
commit e15b704680

View file

@ -210,6 +210,16 @@ class ChatListItem extends StatelessWidget {
), ),
SizedBox(width: 4), 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( Expanded(
child: typingText.isNotEmpty child: typingText.isNotEmpty
? Text( ? Text(
@ -230,8 +240,6 @@ class ChatListItem extends StatelessWidget {
: Text( : Text(
room.lastEvent?.getLocalizedBody( room.lastEvent?.getLocalizedBody(
MatrixLocals(L10n.of(context)), MatrixLocals(L10n.of(context)),
withSenderNamePrefix:
!ownMessage && !room.isDirectChat,
hideReply: true, hideReply: true,
) ?? ) ??
'', '',
@ -239,6 +247,9 @@ class ChatListItem extends StatelessWidget {
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: room.notificationCount > 0
? Theme.of(context).colorScheme.secondary
: null,
decoration: room.lastEvent?.redacted == true decoration: room.lastEvent?.redacted == true
? TextDecoration.lineThrough ? TextDecoration.lineThrough
: null, : null,