From 34e71df6eaec36a70c2c1758c1d8442f0b03fde1 Mon Sep 17 00:00:00 2001 From: Beatrice Guerra Date: Tue, 17 Dec 2024 10:38:48 +0100 Subject: [PATCH] refactor: replace badge deprecation --- .../app/detail-panel/preview/parts/message-contact-list.tsx | 3 ++- .../app/folder-panel/conversations/conversation-list-item.tsx | 3 ++- src/views/app/folder-panel/messages/message-list-item.tsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/app/detail-panel/preview/parts/message-contact-list.tsx b/src/views/app/detail-panel/preview/parts/message-contact-list.tsx index 07641485e..023733446 100644 --- a/src/views/app/detail-panel/preview/parts/message-contact-list.tsx +++ b/src/views/app/detail-panel/preview/parts/message-contact-list.tsx @@ -187,7 +187,8 @@ const MessageContactList: FC<{ folderId, folderName: messageFolder.name })} - type={textReadValues.badge} + backgroundColor={(textReadValues.badge === 'unread' && 'primary') || 'gray2'} + color={(textReadValues.badge === 'unread' && 'gray6') || 'gray0'} /> )} diff --git a/src/views/app/folder-panel/conversations/conversation-list-item.tsx b/src/views/app/folder-panel/conversations/conversation-list-item.tsx index 8e818cffd..e8c593d61 100644 --- a/src/views/app/folder-panel/conversations/conversation-list-item.tsx +++ b/src/views/app/folder-panel/conversations/conversation-list-item.tsx @@ -463,7 +463,8 @@ export const ConversationListItem: FC = memo( diff --git a/src/views/app/folder-panel/messages/message-list-item.tsx b/src/views/app/folder-panel/messages/message-list-item.tsx index 845364cc6..deb2c01e0 100644 --- a/src/views/app/folder-panel/messages/message-list-item.tsx +++ b/src/views/app/folder-panel/messages/message-list-item.tsx @@ -354,7 +354,8 @@ export const MessageListItem: FC = memo(function MessageLi folderId: firstChildFolderId, folderName: messageFolder?.name ?? '' })} - type={textReadValues.badge} + backgroundColor={(textReadValues.badge === 'unread' && 'primary') || 'gray2'} + color={(textReadValues.badge === 'unread' && 'gray6') || 'gray0'} /> )}