Skip to content

Commit

Permalink
Merge pull request Expensify#43454 from bernhardoj/fix/43126-hide-lea…
Browse files Browse the repository at this point in the history
…ve-button-for-thread

Don't show leave button in report details page if it's a thread
  • Loading branch information
puneetlath authored Jun 13, 2024
2 parents a6ed74b + 68dee64 commit 595967d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
});
}

if (isGroupChat || (isChatRoom && ReportUtils.canLeaveChat(report, policy))) {
if (!isThread && (isGroupChat || (isChatRoom && ReportUtils.canLeaveChat(report, policy)))) {
items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.LEAVE_ROOM,
translationKey: 'common.leave',
Expand All @@ -228,6 +228,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
isArchivedRoom,
isGroupChat,
isDefaultRoom,
isThread,
isChatThread,
isPolicyEmployee,
isPolicyExpenseChat,
Expand Down

0 comments on commit 595967d

Please sign in to comment.