subtract admin notifications from social count

fallout from #1487
This commit is contained in:
Matthew Taylor 2017-08-31 17:48:07 -04:00
parent 3dd768f2f6
commit 6dbc4abdc5

View file

@ -224,6 +224,7 @@ var MessagesPresentation = injectIntl(React.createClass({
if (Object.keys(this.props.scratcherInvite).length > 0) {
adminMessageLength = adminMessageLength + 1;
}
var numNewSocialMessages = this.props.numNewMessages - adminMessageLength;
return (
<div className="messages">
@ -308,7 +309,7 @@ var MessagesPresentation = injectIntl(React.createClass({
<SocialMessagesList
loadStatus={this.props.requestStatus.messages}
messages={this.props.messages}
numNewMessages={this.props.numNewMessages}
numNewMessages={numNewSocialMessages}
loadMore={this.props.loadMore}
loadMoreMethod={this.props.loadMoreMethod}
/>