From 2660cbe3fcd79e3fc0344d24ebb0bb652f0c5f33 Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 28 Apr 2023 16:10:24 +0700 Subject: [PATCH 1/2] fix GBR and RBR show up at the same time in the LHN --- src/components/LHNOptionsList/OptionRowLHN.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index 51dd75f19bb1..a5da06fccd36 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -97,6 +97,8 @@ const OptionRowLHN = (props) => { const avatarTooltips = !optionItem.isChatRoom && !optionItem.isArchivedRoom ? _.pluck(optionItem.displayNamesWithTooltips, 'tooltip') : undefined; + const hasBrickError = optionItem.brickRoadIndicator === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR; + return ( { ) : null} - {optionItem.brickRoadIndicator === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR && ( + {hasBrickError && ( { )} - {optionItem.hasOutstandingIOU && !optionItem.isIOUReportOwner && } + {!hasBrickError + && optionItem.hasOutstandingIOU && !optionItem.isIOUReportOwner && } {optionItem.isPinned && ( Date: Tue, 2 May 2023 15:34:56 +0700 Subject: [PATCH 2/2] hide pinned button while LHN has green dot --- src/components/LHNOptionsList/OptionRowLHN.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index 7132873955b9..8e11458446d1 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -96,9 +96,8 @@ const OptionRowLHN = (props) => { const focusedBackgroundColor = styles.sidebarLinkActive.backgroundColor; const avatarTooltips = !optionItem.isChatRoom && !optionItem.isArchivedRoom ? _.pluck(optionItem.displayNamesWithTooltips, 'tooltip') : undefined; - const shouldShowGreenDotIndicator = optionItem.isUnreadWithMention || (optionItem.hasOutstandingIOU && !optionItem.isIOUReportOwner); - const hasBrickError = optionItem.brickRoadIndicator === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR; + const shouldShowGreenDotIndicator = !hasBrickError && (optionItem.isUnreadWithMention || (optionItem.hasOutstandingIOU && !optionItem.isIOUReportOwner)); return ( { style={[styles.flexRow, styles.alignItemsCenter]} accessible={false} > - {!hasBrickError - && shouldShowGreenDotIndicator && ( + {shouldShowGreenDotIndicator && ( { )} - {optionItem.isPinned && ( + {!shouldShowGreenDotIndicator && optionItem.isPinned && (