Clean up chat list item

This commit is contained in:
Christian Pauly 2020-05-09 13:03:12 +02:00
parent 51c060f954
commit da7b6ac27b

View file

@ -147,13 +147,12 @@ class ChatListItem extends StatelessWidget {
title: Row( title: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Row( child: Text(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
room.getLocalizedDisplayname(L10n.of(context)), room.getLocalizedDisplayname(L10n.of(context)),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
softWrap: false,
),
), ),
SizedBox(width: 4), SizedBox(width: 4),
room.pushRuleState == PushRuleState.notify room.pushRuleState == PushRuleState.notify
@ -163,9 +162,6 @@ class ChatListItem extends StatelessWidget {
color: Colors.grey[400], color: Colors.grey[400],
size: 16, size: 16,
), ),
],
),
),
Text( Text(
room.timeCreated.localizedTimeShort(context), room.timeCreated.localizedTimeShort(context),
style: TextStyle( style: TextStyle(
@ -185,6 +181,7 @@ class ChatListItem extends StatelessWidget {
style: TextStyle( style: TextStyle(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
), ),
softWrap: false,
) )
: Text( : Text(
room.lastEvent.getLocalizedBody( room.lastEvent.getLocalizedBody(
@ -192,6 +189,7 @@ class ChatListItem extends StatelessWidget {
withSenderNamePrefix: !room.isDirectChat, withSenderNamePrefix: !room.isDirectChat,
hideReply: true, hideReply: true,
), ),
softWrap: false,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(