Merge branch 'soru/unread-messages-badge' into 'main'

fix: Correctly size the unread bubble in the room list

Closes #494

See merge request famedly/fluffychat!475
This commit is contained in:
Krille Fear 2021-08-07 17:29:31 +00:00
commit e001e0de26
1 changed files with 3 additions and 1 deletions

View File

@ -291,7 +291,9 @@ class ChatListItem extends StatelessWidget {
height: unreadBubbleSize, height: unreadBubbleSize,
width: room.notificationCount == 0 && !room.isUnread width: room.notificationCount == 0 && !room.isUnread
? 0 ? 0
: unreadBubbleSize, : (unreadBubbleSize - 10) *
room.notificationCount.toString().length +
10,
decoration: BoxDecoration( decoration: BoxDecoration(
color: room.highlightCount > 0 color: room.highlightCount > 0
? Colors.red ? Colors.red