mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-17 14:30:40 +01:00
style: Give chat list list tiles rounded corners
This commit is contained in:
parent
ede5fdc348
commit
a090346046
@ -127,13 +127,18 @@ class ChatListItem extends StatelessWidget {
|
||||
final displayname = room.getLocalizedDisplayname(
|
||||
MatrixLocals(L10n.of(context)!),
|
||||
);
|
||||
return Material(
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Material(
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
clipBehavior: Clip.hardEdge,
|
||||
color: selected
|
||||
? Theme.of(context).colorScheme.primaryContainer
|
||||
: activeChat
|
||||
? Theme.of(context).colorScheme.secondaryContainer
|
||||
: Colors.transparent,
|
||||
child: ListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
onLongPress: onLongPress,
|
||||
leading: selected
|
||||
? SizedBox(
|
||||
@ -254,7 +259,8 @@ class ChatListItem extends StatelessWidget {
|
||||
hideEdit: true,
|
||||
plaintextBody: true,
|
||||
removeMarkdown: true,
|
||||
withSenderNamePrefix: !room.isDirectChat ||
|
||||
withSenderNamePrefix:
|
||||
!room.isDirectChat ||
|
||||
room.directChatMatrixID !=
|
||||
room.lastEvent?.senderId,
|
||||
) ??
|
||||
@ -264,8 +270,9 @@ class ChatListItem extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontWeight: unread ? FontWeight.w600 : null,
|
||||
color:
|
||||
Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurfaceVariant,
|
||||
decoration: room.lastEvent?.redacted == true
|
||||
? TextDecoration.lineThrough
|
||||
: null,
|
||||
@ -279,8 +286,9 @@ class ChatListItem extends StatelessWidget {
|
||||
curve: FluffyThemes.animationCurve,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 7),
|
||||
height: unreadBubbleSize,
|
||||
width:
|
||||
room.notificationCount == 0 && !unread && !room.hasNewMessages
|
||||
width: room.notificationCount == 0 &&
|
||||
!unread &&
|
||||
!room.hasNewMessages
|
||||
? 0
|
||||
: (unreadBubbleSize - 9) *
|
||||
room.notificationCount.toString().length +
|
||||
@ -316,6 +324,7 @@ class ChatListItem extends StatelessWidget {
|
||||
),
|
||||
onTap: () => clickAction(context),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user