This commit is contained in:
Christian Pauly 2020-01-03 14:44:39 +01:00
parent 1bd913c35d
commit a4dfed9361
2 changed files with 15 additions and 3 deletions

View File

@ -33,6 +33,7 @@ class ChatListItem extends StatelessWidget {
ChatTime(room.timeCreated).toEventTimeString(), ChatTime(room.timeCreated).toEventTimeString(),
style: TextStyle( style: TextStyle(
color: Color(0xFF555555), color: Color(0xFF555555),
fontSize: 13,
), ),
), ),
], ],
@ -47,13 +48,12 @@ class ChatListItem extends StatelessWidget {
: Icon( : Icon(
Icons.notifications_off, Icons.notifications_off,
color: Colors.grey, color: Colors.grey,
size: 20, size: 16,
), ),
room.notificationCount > 0 room.notificationCount > 0
? Container( ? Container(
width: 20, padding: EdgeInsets.symmetric(horizontal: 5),
height: 20, height: 20,
margin: EdgeInsets.only(top: 3),
decoration: BoxDecoration( decoration: BoxDecoration(
color: room.highlightCount > 0 color: room.highlightCount > 0
? Colors.red ? Colors.red

View File

@ -87,6 +87,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
senderPrefix + event.getBody(), senderPrefix + event.getBody(),
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
decoration: event.redacted ? TextDecoration.lineThrough : null, decoration: event.redacted ? TextDecoration.lineThrough : null,
@ -96,6 +97,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
"* " + event.getBody(), "* " + event.getBody(),
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
fontStyle: FontStyle.italic, fontStyle: FontStyle.italic,
@ -106,6 +108,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
"${event.sender.calcDisplayname()} has created the chat", "${event.sender.calcDisplayname()} has created the chat",
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
), ),
@ -114,6 +117,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
"${event.sender.calcDisplayname()} has changed the chat avatar", "${event.sender.calcDisplayname()} has changed the chat avatar",
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
), ),
@ -122,6 +126,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
"${event.sender.calcDisplayname()} has changed the chat name to '${event.content['name']}'", "${event.sender.calcDisplayname()} has changed the chat name to '${event.content['name']}'",
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
), ),
@ -196,6 +201,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
text, text,
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
), ),
@ -204,6 +210,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
"${event.sender.calcDisplayname()} has changed the chat topic to '${event.content['topic']}'", "${event.sender.calcDisplayname()} has changed the chat topic to '${event.content['topic']}'",
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
), ),
@ -212,6 +219,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
"${event.sender.calcDisplayname()} has changed the power levels of the chat", "${event.sender.calcDisplayname()} has changed the power levels of the chat",
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
), ),
@ -220,6 +228,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
"${event.sender.calcDisplayname()} has changed the history visibility of the chat to '${event.content['history_visibility']}'", "${event.sender.calcDisplayname()} has changed the history visibility of the chat to '${event.content['history_visibility']}'",
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
), ),
@ -228,6 +237,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
"${event.sender.calcDisplayname()} has changed the join rules of the chat to '${event.content['join_rule']}'", "${event.sender.calcDisplayname()} has changed the join rules of the chat to '${event.content['join_rule']}'",
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
), ),
@ -245,6 +255,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
"${event.sender.calcDisplayname()} has changed the canonical alias to: ${event.content['canonical_alias']}", "${event.sender.calcDisplayname()} has changed the canonical alias to: ${event.content['canonical_alias']}",
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
), ),
@ -253,6 +264,7 @@ class MessageContent extends StatelessWidget {
return Text( return Text(
"${event.sender.calcDisplayname()} sent a ${event.typeKey} event", "${event.sender.calcDisplayname()} sent a ${event.typeKey} event",
maxLines: maxLines, maxLines: maxLines,
overflow: textOnly ? TextOverflow.ellipsis : null,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
decoration: event.redacted ? TextDecoration.lineThrough : null, decoration: event.redacted ? TextDecoration.lineThrough : null,