chore: Adjust avatar size and chat list item design

This commit is contained in:
krille-chan 2026-02-18 16:58:51 +01:00
commit e852453dec
No known key found for this signature in database
3 changed files with 4 additions and 20 deletions

View file

@ -42,7 +42,6 @@ class ChatListItem extends StatelessWidget {
final typingText = room.getLocalizedTypingText(context); final typingText = room.getLocalizedTypingText(context);
final lastEvent = room.lastEvent; final lastEvent = room.lastEvent;
final ownMessage = lastEvent?.senderId == room.client.userID; final ownMessage = lastEvent?.senderId == room.client.userID;
final unread = room.isUnread;
final directChatMatrixId = room.directChatMatrixID; final directChatMatrixId = room.directChatMatrixID;
final isDirectChat = directChatMatrixId != null; final isDirectChat = directChatMatrixId != null;
final hasNotifications = room.notificationCount > 0; final hasNotifications = room.notificationCount > 0;
@ -185,11 +184,6 @@ class ChatListItem extends StatelessWidget {
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
softWrap: false, softWrap: false,
style: TextStyle(
fontWeight: unread || room.hasNewMessages
? FontWeight.w500
: null,
),
), ),
), ),
if (isMuted) if (isMuted)
@ -215,10 +209,7 @@ class ChatListItem extends StatelessWidget {
room.latestEventReceivedTime.localizedTimeShort( room.latestEventReceivedTime.localizedTimeShort(
context, context,
), ),
style: TextStyle( style: TextStyle(fontSize: 11),
fontSize: 12,
color: theme.colorScheme.outline,
),
), ),
), ),
], ],
@ -276,10 +267,7 @@ class ChatListItem extends StatelessWidget {
const SizedBox(width: 4), const SizedBox(width: 4),
Text( Text(
L10n.of(context).thread, L10n.of(context).thread,
style: TextStyle( style: TextStyle(fontSize: 11),
fontSize: 12,
color: theme.colorScheme.outline,
),
), ),
], ],
), ),
@ -292,7 +280,6 @@ class ChatListItem extends StatelessWidget {
L10n.of( L10n.of(
context, context,
).countChats(room.spaceChildren.length), ).countChats(room.spaceChildren.length),
style: TextStyle(color: theme.colorScheme.outline),
) )
: typingText.isNotEmpty : typingText.isNotEmpty
? Text( ? Text(
@ -347,9 +334,6 @@ class ChatListItem extends StatelessWidget {
maxLines: room.notificationCount >= 1 ? 2 : 1, maxLines: room.notificationCount >= 1 ? 2 : 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: unread || room.hasNewMessages
? theme.colorScheme.onSurface
: theme.colorScheme.outline,
decoration: room.lastEvent?.redacted == true decoration: room.lastEvent?.redacted == true
? TextDecoration.lineThrough ? TextDecoration.lineThrough
: null, : null,

View file

@ -48,7 +48,7 @@ class UnreadBubble extends StatelessWidget {
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
textAlign: TextAlign.center, textAlign: .center,
) )
: const SizedBox.shrink(), : const SizedBox.shrink(),
); );

View file

@ -11,7 +11,7 @@ class Avatar extends StatelessWidget {
final String? name; final String? name;
final double size; final double size;
final void Function()? onTap; final void Function()? onTap;
static const double defaultSize = 44; static const double defaultSize = 48;
final Client? client; final Client? client;
final String? presenceUserId; final String? presenceUserId;
final Color? presenceBackgroundColor; final Color? presenceBackgroundColor;