From 8f16a56ff51755f5f3859becfa6652c5581b47f0 Mon Sep 17 00:00:00 2001 From: Santhoshkumar Sellavel Date: Sun, 26 Sep 2021 22:35:55 +0530 Subject: [PATCH 1/2] Shows NEW indicator over unread messages, on interaction with new marker badge --- src/pages/home/report/ReportActionsView.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index bc91c5def802..2cd1ef3831e5 100755 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -399,11 +399,15 @@ class ReportActionsView extends React.Component { * @param {Boolean} [shouldResetLocalCount=false] Whether count should increment or reset */ updateLocalUnreadActionCount(shouldResetLocalCount = false) { - this.setState(prevState => ({ - localUnreadActionCount: shouldResetLocalCount + this.setState((prevState) => { + const localUnreadActionCount = shouldResetLocalCount ? this.props.report.unreadActionCount - : prevState.localUnreadActionCount + this.props.report.unreadActionCount, - })); + : prevState.localUnreadActionCount + this.props.report.unreadActionCount; + this.updateUnreadIndicatorPosition(localUnreadActionCount); + return { + localUnreadActionCount, + }; + }); } /** From bf129495c507a7a52b143cf077377fe46b133323 Mon Sep 17 00:00:00 2001 From: Santhoshkumar Sellavel <85645967+Santhosh-Sellavel@users.noreply.github.com> Date: Tue, 5 Oct 2021 19:28:28 +0530 Subject: [PATCH 2/2] PR Requested Changes. --- src/pages/home/report/ReportActionsView.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index 2cd1ef3831e5..851cbaf0cbab 100755 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -404,9 +404,7 @@ class ReportActionsView extends React.Component { ? this.props.report.unreadActionCount : prevState.localUnreadActionCount + this.props.report.unreadActionCount; this.updateUnreadIndicatorPosition(localUnreadActionCount); - return { - localUnreadActionCount, - }; + return {localUnreadActionCount}; }); }