Skip to content

Commit

Permalink
fixup! fixup! TW-1902 update icons, text style
Browse files Browse the repository at this point in the history
  • Loading branch information
KhaledNjim committed Sep 10, 2024
1 parent 45957f0 commit 0b61f1d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions lib/pages/chat_list/chat_list_item_subtitle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ class ChatListItemSubtitle extends StatelessWidget with ChatListItemMixin {
room.hasNewMessages,
room.notificationCount > 0,
);
final isMediaEvent = room.lastEvent?.messageType == MessageTypes.Image ||
room.lastEvent?.messageType == MessageTypes.Video;

final haveNotificationsAndMuted =
room.notificationCount > 0 && room.isMuted;

final haveNotificationsOrUnread =
room.notificationCount > 0 || room.markedUnread;

return Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
Expand All @@ -39,8 +48,7 @@ class ChatListItemSubtitle extends StatelessWidget with ChatListItemMixin {
context: context,
room: room,
)
: room.lastEvent?.messageType == MessageTypes.Image ||
room.lastEvent?.messageType == MessageTypes.Video
: isMediaEvent
? chatlistItemMediaPreviewSubTitle(
context,
room,
Expand Down Expand Up @@ -128,9 +136,9 @@ class ChatListItemSubtitle extends StatelessWidget with ChatListItemMixin {
color:
room.highlightCount > 0 || room.membership == Membership.invite
? Theme.of(context).colorScheme.primary
: room.notificationCount > 0 && room.isMuted
: haveNotificationsAndMuted
? LinagoraRefColors.material().tertiary[30]
: room.notificationCount > 0 || room.markedUnread
: haveNotificationsOrUnread
? Theme.of(context).colorScheme.primary
: LinagoraRefColors.material().tertiary[30],
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
Expand Down

0 comments on commit 0b61f1d

Please sign in to comment.