From 5739b7854e6e7c0bf886cd922d2cb32ab9c42ece Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Mon, 23 Oct 2023 10:09:07 +0700 Subject: [PATCH 1/2] Hide the thread that have not been commented --- src/libs/ReportUtils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 93774afc0aef..da909a45d680 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -3195,6 +3195,11 @@ function shouldReportBeInOptionList(report, currentReportId, isInGSDMode, betas, const isEmptyChat = !report.lastMessageText && !report.lastMessageTranslationKey && !lastVisibleMessage.lastMessageText && !lastVisibleMessage.lastMessageTranslationKey; const canHideReport = shouldHideReport(report, currentReportId); + // Hide only chat threads that haven't been commented on (other threads are actionable) + if (isChatThread(report) && canHideReport && isEmptyChat) { + return false; + } + // Include reports if they are pinned if (report.isPinned) { return true; From e9777a763c7abd072f45c96fdf8905f6ecfa0277 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 24 Oct 2023 23:15:23 +0700 Subject: [PATCH 2/2] don't hide the pinned thread --- src/libs/ReportUtils.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index da909a45d680..307f03be50ac 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -3195,16 +3195,16 @@ function shouldReportBeInOptionList(report, currentReportId, isInGSDMode, betas, const isEmptyChat = !report.lastMessageText && !report.lastMessageTranslationKey && !lastVisibleMessage.lastMessageText && !lastVisibleMessage.lastMessageTranslationKey; const canHideReport = shouldHideReport(report, currentReportId); - // Hide only chat threads that haven't been commented on (other threads are actionable) - if (isChatThread(report) && canHideReport && isEmptyChat) { - return false; - } - // Include reports if they are pinned if (report.isPinned) { return true; } + // Hide only chat threads that haven't been commented on (other threads are actionable) + if (isChatThread(report) && canHideReport && isEmptyChat) { + return false; + } + // Include reports that have errors from trying to add a workspace // If we excluded it, then the red-brock-road pattern wouldn't work for the user to resolve the error if (report.errorFields && report.errorFields.addWorkspaceRoom) {