chore: Better display rooms without known messages

pull/2211/head
Christian Kußowski 4 weeks ago
parent b40b0eda57
commit 45331c1812
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

@ -3374,5 +3374,6 @@
"moreEvents": "More events", "moreEvents": "More events",
"@moreEvents": {}, "@moreEvents": {},
"declineInvitation": "Decline invitation", "declineInvitation": "Decline invitation",
"@declineInvitation": {} "@declineInvitation": {},
"noMessagesYet": "No messages yet"
} }

@ -202,13 +202,12 @@ class ChatListItem extends StatelessWidget {
color: theme.colorScheme.primary, color: theme.colorScheme.primary,
), ),
), ),
if (!room.isSpace && if (!room.isSpace && room.membership != Membership.invite)
lastEvent != null &&
room.membership != Membership.invite)
Padding( Padding(
padding: const EdgeInsets.only(left: 4.0), padding: const EdgeInsets.only(left: 4.0),
child: Text( child: Text(
lastEvent.originServerTs.localizedTimeShort(context), room.latestEventReceivedTime
.localizedTimeShort(context),
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: theme.colorScheme.outline, color: theme.colorScheme.outline,
@ -303,7 +302,7 @@ class ChatListItem extends StatelessWidget {
: L10n.of(context) : L10n.of(context)
.inviteGroupChat) .inviteGroupChat)
: snapshot.data ?? : snapshot.data ??
L10n.of(context).emptyChat, L10n.of(context).noMessagesYet,
softWrap: false, softWrap: false,
maxLines: room.notificationCount >= 1 ? 2 : 1, maxLines: room.notificationCount >= 1 ? 2 : 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,

Loading…
Cancel
Save