From 2d97aaa1fb0f766c97a22533fc94ed201249f4f2 Mon Sep 17 00:00:00 2001
From: Rodrigo Lino da Costa <rodrigo@expensify.com>
Date: Thu, 1 Feb 2024 12:13:17 -0300
Subject: [PATCH 1/4] adding isPinned to memo

---
 src/pages/home/ReportScreen.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js
index f28e418865ff..69405f7a124f 100644
--- a/src/pages/home/ReportScreen.js
+++ b/src/pages/home/ReportScreen.js
@@ -200,6 +200,7 @@ function ReportScreen({
             iouReportID: reportProp.iouReportID,
             isOwnPolicyExpenseChat: reportProp.isOwnPolicyExpenseChat,
             notificationPreference: reportProp.notificationPreference,
+            isPinned: reportProp.isPinned,
         }),
         [
             reportProp.lastReadTime,
@@ -230,6 +231,7 @@ function ReportScreen({
             reportProp.iouReportID,
             reportProp.isOwnPolicyExpenseChat,
             reportProp.notificationPreference,
+            reportProp.isPinned,
         ],
     );
 
@@ -658,6 +660,7 @@ export default compose(
             prevProps.report.isOptimisticReport === nextProps.report.isOptimisticReport &&
             prevProps.report.statusNum === nextProps.report.statusNum &&
             _.isEqual(prevProps.report.pendingFields, nextProps.report.pendingFields) &&
-            prevProps.currentReportID === nextProps.currentReportID,
+            prevProps.currentReportID === nextProps.currentReportID &&
+            prevProps.report.isPinned === nextProps.report.isPinned
     ),
 );

From e631bdca963cbdc862f988cff7f48fdcaae6aaf7 Mon Sep 17 00:00:00 2001
From: Rodrigo Lino da Costa <rodrigo@expensify.com>
Date: Thu, 1 Feb 2024 12:14:27 -0300
Subject: [PATCH 2/4] missing ,

---
 src/pages/home/ReportScreen.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js
index 69405f7a124f..fddb8bef9c19 100644
--- a/src/pages/home/ReportScreen.js
+++ b/src/pages/home/ReportScreen.js
@@ -661,6 +661,6 @@ export default compose(
             prevProps.report.statusNum === nextProps.report.statusNum &&
             _.isEqual(prevProps.report.pendingFields, nextProps.report.pendingFields) &&
             prevProps.currentReportID === nextProps.currentReportID &&
-            prevProps.report.isPinned === nextProps.report.isPinned
+            prevProps.report.isPinned === nextProps.report.isPinned,
     ),
 );

From be9574b97e2d53a1cd1150c808d81479bc3653c4 Mon Sep 17 00:00:00 2001
From: Rodrigo Lino da Costa <rodrigo@expensify.com>
Date: Thu, 1 Feb 2024 13:37:00 -0300
Subject: [PATCH 3/4] fixes join/leave thread action

---
 src/pages/home/ReportScreen.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js
index fddb8bef9c19..99cf30a20dc3 100644
--- a/src/pages/home/ReportScreen.js
+++ b/src/pages/home/ReportScreen.js
@@ -661,6 +661,7 @@ export default compose(
             prevProps.report.statusNum === nextProps.report.statusNum &&
             _.isEqual(prevProps.report.pendingFields, nextProps.report.pendingFields) &&
             prevProps.currentReportID === nextProps.currentReportID &&
+            prevProps.report.notificationPreference === nextProps.report.notificationPreference &&
             prevProps.report.isPinned === nextProps.report.isPinned,
     ),
 );

From 8080cc32e89a961b41785d82890ea58b77d58a3d Mon Sep 17 00:00:00 2001
From: Rodrigo Lino da Costa <rodrigo@expensify.com>
Date: Thu, 1 Feb 2024 13:58:20 -0300
Subject: [PATCH 4/4] memoizing chatReportID for ReportScreen

---
 src/pages/home/ReportScreen.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js
index 99cf30a20dc3..da1ad3426c2f 100644
--- a/src/pages/home/ReportScreen.js
+++ b/src/pages/home/ReportScreen.js
@@ -201,6 +201,7 @@ function ReportScreen({
             isOwnPolicyExpenseChat: reportProp.isOwnPolicyExpenseChat,
             notificationPreference: reportProp.notificationPreference,
             isPinned: reportProp.isPinned,
+            chatReportID: reportProp.chatReportID,
         }),
         [
             reportProp.lastReadTime,
@@ -232,6 +233,7 @@ function ReportScreen({
             reportProp.isOwnPolicyExpenseChat,
             reportProp.notificationPreference,
             reportProp.isPinned,
+            reportProp.chatReportID,
         ],
     );
 
@@ -662,6 +664,7 @@ export default compose(
             _.isEqual(prevProps.report.pendingFields, nextProps.report.pendingFields) &&
             prevProps.currentReportID === nextProps.currentReportID &&
             prevProps.report.notificationPreference === nextProps.report.notificationPreference &&
-            prevProps.report.isPinned === nextProps.report.isPinned,
+            prevProps.report.isPinned === nextProps.report.isPinned &&
+            prevProps.report.chatReportID === nextProps.report.chatReportID,
     ),
 );
