From 28e353bef6e8aad64fc1fc7de6a63d2737b35085 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Sat, 11 Dec 2021 00:33:03 +0530 Subject: [PATCH 1/2] Show Empty Chat with draft messages in LHN --- src/libs/OptionsListUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index eec3a3ae7387..bb57615c86a2 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -685,12 +685,12 @@ function getSidebarOptions( prioritizePinnedReports: true, prioritizeIOUDebts: true, prioritizeReportsWithDraftComments: true, + showReportsWithDrafts: true, }; if (priorityMode === CONST.PRIORITY_MODE.GSD) { sideBarOptions = { hideReadReports: true, sortByAlphaAsc: true, - showReportsWithDrafts: true, }; } From 6bbd9cf7921468e54c1ed780e6314ee9d380da72 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Sat, 11 Dec 2021 03:36:07 +0530 Subject: [PATCH 2/2] clean up --- src/libs/OptionsListUtils.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index bb57615c86a2..e8c17a932ef9 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -357,7 +357,6 @@ function getOptions(reports, personalDetails, activeReportID, { searchValue = '', showChatPreviewLine = false, showReportsWithNoComments = false, - showReportsWithDrafts = false, hideReadReports = false, sortByAlphaAsc = false, forcePolicyNamePreview = false, @@ -397,11 +396,10 @@ function getOptions(reports, personalDetails, activeReportID, { const reportContainsIOUDebt = iouReportOwner && iouReportOwner !== currentUserLogin; const shouldFilterReportIfEmpty = !showReportsWithNoComments && report.lastMessageTimestamp === 0; const shouldFilterReportIfRead = hideReadReports && report.unreadActionCount === 0; - const shouldShowReportIfHasDraft = showReportsWithDrafts && hasDraftComment; const shouldFilterReport = shouldFilterReportIfEmpty || shouldFilterReportIfRead; if (report.reportID !== activeReportID && !report.isPinned - && !shouldShowReportIfHasDraft + && !hasDraftComment && shouldFilterReport && !reportContainsIOUDebt) { return; @@ -685,7 +683,6 @@ function getSidebarOptions( prioritizePinnedReports: true, prioritizeIOUDebts: true, prioritizeReportsWithDraftComments: true, - showReportsWithDrafts: true, }; if (priorityMode === CONST.PRIORITY_MODE.GSD) { sideBarOptions = {