Skip to content

Commit

Permalink
Hide All Muted Chats
Browse files Browse the repository at this point in the history
  • Loading branch information
srikarparsi committed Jul 25, 2023
1 parent 205c91c commit c72ee32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/LHNOptionsList/OptionRowLHN.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ function OptionRowLHN(props) {
return null;
}

const isMuted = optionItem.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.MUTE;
if (isMuted && !props.isFocused && !optionItem.isPinned) {
return null;
}

let popoverAnchor = null;
const textStyle = props.isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText;
const textUnreadStyle = optionItem.isUnread ? [textStyle, styles.sidebarLinkTextBold] : [textStyle];
Expand Down
1 change: 1 addition & 0 deletions src/libs/SidebarUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ function getOptionData(report, personalDetails, preferredLocale, policy) {
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);

Expand Down

0 comments on commit c72ee32

Please sign in to comment.