Clean up chat list item

This commit is contained in:
Christian Pauly 2020-05-09 13:03:12 +02:00
parent 51c060f954
commit da7b6ac27b
1 changed files with 15 additions and 17 deletions

View File

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