mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-24 14:32:37 +01:00
fix: Design of invite rooms
This commit is contained in:
parent
8cfe2a1899
commit
aa308647c8
@ -149,7 +149,8 @@ class ChatListItem extends StatelessWidget {
|
||||
final typingText = room.getLocalizedTypingText(context);
|
||||
final ownMessage =
|
||||
room.lastEvent?.senderId == Matrix.of(context).client.userID;
|
||||
final unreadBubbleSize = room.isUnread
|
||||
final unread = room.isUnread || room.membership == Membership.invite;
|
||||
final unreadBubbleSize = unread
|
||||
? room.notificationCount > 0.0
|
||||
? 20.0
|
||||
: 14.0
|
||||
@ -180,8 +181,8 @@ class ChatListItem extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: false,
|
||||
style: TextStyle(
|
||||
fontWeight: room.isUnread ? FontWeight.bold : null,
|
||||
color: room.isUnread
|
||||
fontWeight: unread ? FontWeight.bold : null,
|
||||
color: unread
|
||||
? Theme.of(context).colorScheme.secondary
|
||||
: Theme.of(context).textTheme.bodyText1.color,
|
||||
),
|
||||
@ -211,7 +212,7 @@ class ChatListItem extends StatelessWidget {
|
||||
room.timeCreated.localizedTimeShort(context),
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: room.isUnread
|
||||
color: unread
|
||||
? Theme.of(context).colorScheme.secondary
|
||||
: Theme.of(context).textTheme.bodyText2.color,
|
||||
),
|
||||
@ -264,17 +265,10 @@ class ChatListItem extends StatelessWidget {
|
||||
),
|
||||
softWrap: false,
|
||||
)
|
||||
: room.membership == Membership.invite
|
||||
? Text(
|
||||
L10n.of(context).youAreInvitedToThisChat,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
softWrap: false,
|
||||
)
|
||||
: Text(
|
||||
room.lastEvent?.getLocalizedBody(
|
||||
room.membership == Membership.invite
|
||||
? L10n.of(context).youAreInvitedToThisChat
|
||||
: room.lastEvent?.getLocalizedBody(
|
||||
MatrixLocals(L10n.of(context)),
|
||||
hideReply: true,
|
||||
) ??
|
||||
@ -283,7 +277,7 @@ class ChatListItem extends StatelessWidget {
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: room.isUnread
|
||||
color: unread
|
||||
? Theme.of(context).colorScheme.secondary
|
||||
: Theme.of(context).textTheme.bodyText2.color,
|
||||
decoration: room.lastEvent?.redacted == true
|
||||
@ -298,7 +292,7 @@ class ChatListItem extends StatelessWidget {
|
||||
curve: Curves.bounceInOut,
|
||||
padding: EdgeInsets.symmetric(horizontal: 7),
|
||||
height: unreadBubbleSize,
|
||||
width: room.notificationCount == 0 && !room.isUnread
|
||||
width: room.notificationCount == 0 && !unread
|
||||
? 0
|
||||
: (unreadBubbleSize - 10) *
|
||||
room.notificationCount.toString().length +
|
||||
|
Loading…
Reference in New Issue
Block a user