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,25 +147,21 @@ class ChatListItem extends StatelessWidget {
title: Row( title: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Row( child: Text(
mainAxisSize: MainAxisSize.min, room.getLocalizedDisplayname(L10n.of(context)),
children: <Widget>[ maxLines: 1,
Text( overflow: TextOverflow.ellipsis,
room.getLocalizedDisplayname(L10n.of(context)), softWrap: false,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
SizedBox(width: 4),
room.pushRuleState == PushRuleState.notify
? Container()
: Icon(
Icons.notifications_off,
color: Colors.grey[400],
size: 16,
),
],
), ),
), ),
SizedBox(width: 4),
room.pushRuleState == PushRuleState.notify
? Container()
: Icon(
Icons.notifications_off,
color: Colors.grey[400],
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(