Skip to content

Commit

Permalink
hide Join menu with whisper thread
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Dec 7, 2023
1 parent dfb4b14 commit 4512edc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function HeaderView(props) {
const parentReportAction = ReportActionsUtils.getParentReportAction(props.report);
const isCanceledTaskReport = ReportUtils.isCanceledTaskReport(props.report, parentReportAction);
const lastVisibleMessage = ReportActionsUtils.getLastVisibleMessage(props.report.reportID);
const isWhisperAction = ReportActionsUtils.isWhisperAction(parentReportAction);
const isEmptyChat = !props.report.lastMessageText && !props.report.lastMessageTranslationKey && !lastVisibleMessage.lastMessageText && !lastVisibleMessage.lastMessageTranslationKey;
const isUserCreatedPolicyRoom = ReportUtils.isUserCreatedPolicyRoom(props.report);
const isPolicyMember = useMemo(() => !_.isEmpty(props.policy), [props.policy]);
Expand Down Expand Up @@ -134,7 +135,7 @@ function HeaderView(props) {
}

if ((isChatThread && !isEmptyChat) || isUserCreatedPolicyRoom || canLeaveRoom) {
if (props.report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) {
if (!isWhisperAction && props.report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) {
threeDotMenuItems.push({
icon: Expensicons.ChatBubbles,
text: translate('common.join'),
Expand Down

0 comments on commit 4512edc

Please sign in to comment.