From aed317168167eb4c9b23f7a1aa5a479b59febcb7 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 5 Nov 2021 11:09:22 -0700 Subject: [PATCH 1/3] Removing draft comments param --- src/pages/home/sidebar/SidebarLinks.js | 1 - tests/unit/OptionsListUtilsTest.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 7320895074ee..b84980b5f511 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -97,7 +97,6 @@ class SidebarLinks extends React.Component { const sidebarOptions = getSidebarOptions( props.reports, props.personalDetails, - props.draftComments, activeReportID, props.priorityMode, props.betas, diff --git a/tests/unit/OptionsListUtilsTest.js b/tests/unit/OptionsListUtilsTest.js index df49d4f11d48..0da4cf408d2e 100644 --- a/tests/unit/OptionsListUtilsTest.js +++ b/tests/unit/OptionsListUtilsTest.js @@ -565,7 +565,6 @@ describe('OptionsListUtils', () => { const results = OptionsListUtils.getSidebarOptions( reportsWithAddedPinnedMessagelessReport, PERSONAL_DETAILS, - 0, CONST.PRIORITY_MODE.DEFAULT, ); @@ -597,7 +596,7 @@ describe('OptionsListUtils', () => { () => setReportWithDraft(1, true) .then(() => { // When we call getSidebarOptions() with no search value - const results = OptionsListUtils.getSidebarOptions(REPORTS, PERSONAL_DETAILS, 0, CONST.PRIORITY_MODE.GSD); + const results = OptionsListUtils.getSidebarOptions(REPORTS, PERSONAL_DETAILS, CONST.PRIORITY_MODE.GSD); // Then expect all of the reports to be shown both multiple and single participant except the // report that has no lastMessageTimestamp and the chat with Thor who's message is read From 13bb449d8eaf195d2184c32d436f396cc897d619 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 5 Nov 2021 11:23:17 -0700 Subject: [PATCH 2/3] Oops those were activeReportID param and not draftComments. Getting them back. --- tests/unit/OptionsListUtilsTest.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/OptionsListUtilsTest.js b/tests/unit/OptionsListUtilsTest.js index 0da4cf408d2e..df49d4f11d48 100644 --- a/tests/unit/OptionsListUtilsTest.js +++ b/tests/unit/OptionsListUtilsTest.js @@ -565,6 +565,7 @@ describe('OptionsListUtils', () => { const results = OptionsListUtils.getSidebarOptions( reportsWithAddedPinnedMessagelessReport, PERSONAL_DETAILS, + 0, CONST.PRIORITY_MODE.DEFAULT, ); @@ -596,7 +597,7 @@ describe('OptionsListUtils', () => { () => setReportWithDraft(1, true) .then(() => { // When we call getSidebarOptions() with no search value - const results = OptionsListUtils.getSidebarOptions(REPORTS, PERSONAL_DETAILS, CONST.PRIORITY_MODE.GSD); + const results = OptionsListUtils.getSidebarOptions(REPORTS, PERSONAL_DETAILS, 0, CONST.PRIORITY_MODE.GSD); // Then expect all of the reports to be shown both multiple and single participant except the // report that has no lastMessageTimestamp and the chat with Thor who's message is read From 7aca1ad35bd9928e7ebe4a955c18f433209a6ca2 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 5 Nov 2021 11:50:34 -0700 Subject: [PATCH 3/3] Removing unnecessary prop --- src/pages/home/sidebar/SidebarLinks.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index b84980b5f511..e54a0fcceadf 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -274,9 +274,6 @@ export default compose( reports: { key: ONYXKEYS.COLLECTION.REPORT, }, - draftComments: { - key: ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT, - }, personalDetails: { key: ONYXKEYS.PERSONAL_DETAILS, },