Skip to content

Commit

Permalink
hide pinned button while LHN has green dot
Browse files Browse the repository at this point in the history
  • Loading branch information
hungvu193 committed May 2, 2023
1 parent 4d0b22b commit 688ba8e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/LHNOptionsList/OptionRowLHN.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<OfflineWithFeedback
Expand Down Expand Up @@ -219,8 +218,7 @@ const OptionRowLHN = (props) => {
style={[styles.flexRow, styles.alignItemsCenter]}
accessible={false}
>
{!hasBrickError
&& shouldShowGreenDotIndicator && (
{shouldShowGreenDotIndicator && (
<Icon
height={variables.iconSizeNormal}
width={variables.iconSizeNormal}
Expand All @@ -236,7 +234,7 @@ const OptionRowLHN = (props) => {
<Icon src={Expensicons.Pencil} height={16} width={16} />
</View>
)}
{optionItem.isPinned && (
{!shouldShowGreenDotIndicator && optionItem.isPinned && (
<View
style={styles.ml2}
accessibilityLabel={props.translate('sidebarScreen.chatPinned')}
Expand Down

0 comments on commit 688ba8e

Please sign in to comment.