Skip to content

Commit

Permalink
Merge pull request #5534 from Santhosh-Sellavel/show_NEW_marker_fix
Browse files Browse the repository at this point in the history
Show NEW marker over unread messages, while scroll back from viewing history
  • Loading branch information
puneetlath authored Oct 5, 2021
2 parents d3f2934 + bf12949 commit 357af46
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pages/home/report/ReportActionsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,13 @@ 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};
});
}

/**
Expand Down

0 comments on commit 357af46

Please sign in to comment.