mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2026-01-18 10:27:56 +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(
|
final displayname = room.getLocalizedDisplayname(
|
||||||
MatrixLocals(L10n.of(context)!),
|
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
|
color: selected
|
||||||
? Theme.of(context).colorScheme.primaryContainer
|
? Theme.of(context).colorScheme.primaryContainer
|
||||||
: activeChat
|
: activeChat
|
||||||
? Theme.of(context).colorScheme.secondaryContainer
|
? Theme.of(context).colorScheme.secondaryContainer
|
||||||
: Colors.transparent,
|
: Colors.transparent,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
|
contentPadding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
onLongPress: onLongPress,
|
onLongPress: onLongPress,
|
||||||
leading: selected
|
leading: selected
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
@ -254,7 +259,8 @@ class ChatListItem extends StatelessWidget {
|
|||||||
hideEdit: true,
|
hideEdit: true,
|
||||||
plaintextBody: true,
|
plaintextBody: true,
|
||||||
removeMarkdown: true,
|
removeMarkdown: true,
|
||||||
withSenderNamePrefix: !room.isDirectChat ||
|
withSenderNamePrefix:
|
||||||
|
!room.isDirectChat ||
|
||||||
room.directChatMatrixID !=
|
room.directChatMatrixID !=
|
||||||
room.lastEvent?.senderId,
|
room.lastEvent?.senderId,
|
||||||
) ??
|
) ??
|
||||||
@ -264,8 +270,9 @@ class ChatListItem extends StatelessWidget {
|
|||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: unread ? FontWeight.w600 : null,
|
fontWeight: unread ? FontWeight.w600 : null,
|
||||||
color:
|
color: Theme.of(context)
|
||||||
Theme.of(context).colorScheme.onSurfaceVariant,
|
.colorScheme
|
||||||
|
.onSurfaceVariant,
|
||||||
decoration: room.lastEvent?.redacted == true
|
decoration: room.lastEvent?.redacted == true
|
||||||
? TextDecoration.lineThrough
|
? TextDecoration.lineThrough
|
||||||
: null,
|
: null,
|
||||||
@ -279,8 +286,9 @@ class ChatListItem extends StatelessWidget {
|
|||||||
curve: FluffyThemes.animationCurve,
|
curve: FluffyThemes.animationCurve,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 7),
|
padding: const EdgeInsets.symmetric(horizontal: 7),
|
||||||
height: unreadBubbleSize,
|
height: unreadBubbleSize,
|
||||||
width:
|
width: room.notificationCount == 0 &&
|
||||||
room.notificationCount == 0 && !unread && !room.hasNewMessages
|
!unread &&
|
||||||
|
!room.hasNewMessages
|
||||||
? 0
|
? 0
|
||||||
: (unreadBubbleSize - 9) *
|
: (unreadBubbleSize - 9) *
|
||||||
room.notificationCount.toString().length +
|
room.notificationCount.toString().length +
|
||||||
@ -316,6 +324,7 @@ class ChatListItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
onTap: () => clickAction(context),
|
onTap: () => clickAction(context),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user