From baf96277df621d135cd8cf599ddfde3de016802b Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 11 Jul 2023 15:03:47 -0700 Subject: [PATCH 1/3] exclude muted chats that are not focused --- src/components/LHNOptionsList/OptionRowLHN.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index 267d357032b0..e65060966507 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -78,6 +78,11 @@ function OptionRowLHN(props) { return null; } + const isMuted = optionItem.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.MUTE; + if (isMuted && !props.isFocused) { + return null; + } + let popoverAnchor = null; const textStyle = props.isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText; const textUnreadStyle = optionItem.isUnread ? [textStyle, styles.sidebarLinkTextBold] : [textStyle]; From 50a60b7420fe4f8f1a6f2a38cdfeeec4b48e92a6 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 11 Jul 2023 15:04:00 -0700 Subject: [PATCH 2/3] return notification preference in optionList --- src/libs/SidebarUtils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index 7ce126925b24..d655266f8cfa 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -290,6 +290,7 @@ function getOptionData(reportID) { result.tooltipText = ReportUtils.getReportParticipantsTitle(report.participantAccountIDs || []); result.hasOutstandingIOU = report.hasOutstandingIOU; result.parentReportID = report.parentReportID || null; + result.notificationPreference = report.notificationPreference || null; const hasMultipleParticipants = participantPersonalDetailList.length > 1 || result.isChatRoom || result.isPolicyExpenseChat; const subtitle = ReportUtils.getChatRoomSubtitle(report); From 4f0db8251f67bd7b6139d12dad23a4a89d900f70 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Wed, 12 Jul 2023 14:12:30 -0700 Subject: [PATCH 3/3] check for pinned --- src/components/LHNOptionsList/OptionRowLHN.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index e65060966507..84c1e5c6d7da 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -79,7 +79,7 @@ function OptionRowLHN(props) { } const isMuted = optionItem.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.MUTE; - if (isMuted && !props.isFocused) { + if (isMuted && !props.isFocused && !optionItem.isPinned) { return null; }