From 16b10e3c72fae9af4c90f704cc2e852f34d557fe Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Tue, 10 Nov 2020 20:03:28 -0500 Subject: [PATCH 1/2] Make undread chats bold in chat switcher --- src/pages/home/sidebar/ChatSwitcherRow.js | 8 +++++--- src/pages/home/sidebar/ChatSwitcherView.js | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/home/sidebar/ChatSwitcherRow.js b/src/pages/home/sidebar/ChatSwitcherRow.js index 76dcf4bbbb4a..0118d9a1e478 100644 --- a/src/pages/home/sidebar/ChatSwitcherRow.js +++ b/src/pages/home/sidebar/ChatSwitcherRow.js @@ -33,6 +33,8 @@ const ChatSwitcherRow = ({ const textStyle = optionIsFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText; + const textUnreadStyle = option.isUnread + ? [textStyle, styles.sidebarLinkTextUnread] : [textStyle]; return ( {option.text === option.alternateText ? ( - + {option.alternateText} ) : ( <> - + {option.text} - + {option.alternateText} diff --git a/src/pages/home/sidebar/ChatSwitcherView.js b/src/pages/home/sidebar/ChatSwitcherView.js index 9b3be84e24a6..abd3999fd70d 100644 --- a/src/pages/home/sidebar/ChatSwitcherView.js +++ b/src/pages/home/sidebar/ChatSwitcherView.js @@ -363,6 +363,7 @@ class ChatSwitcherView extends React.Component { reportID: report.reportID, type: OPTION_TYPE.REPORT, participants: report.participants, + isUnread: report.unreadActionCount > 0 })) .value(); From 99e5b4d20ddcae8f10d0609b8c9ad02efae8c424 Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Wed, 11 Nov 2020 10:53:55 -0500 Subject: [PATCH 2/2] Combine arrays instead of nesting --- src/pages/home/sidebar/ChatSwitcherRow.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/home/sidebar/ChatSwitcherRow.js b/src/pages/home/sidebar/ChatSwitcherRow.js index 0118d9a1e478..82afb56590fa 100644 --- a/src/pages/home/sidebar/ChatSwitcherRow.js +++ b/src/pages/home/sidebar/ChatSwitcherRow.js @@ -72,15 +72,15 @@ const ChatSwitcherRow = ({ } {option.text === option.alternateText ? ( - + {option.alternateText} ) : ( <> - + {option.text} - + {option.alternateText}