summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/posts_view.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/webapp/components/posts_view.jsx b/webapp/components/posts_view.jsx
index 327756723..7c1f13fca 100644
--- a/webapp/components/posts_view.jsx
+++ b/webapp/components/posts_view.jsx
@@ -410,7 +410,7 @@ export default class PostsView extends React.Component {
}
componentWillReceiveProps(nextProps) {
if (this.props.postList && this.props.postList.order.length) {
- if (this.props.postList.order[0] !== nextProps.postList.order[0] && nextProps.scrollType !== PostsView.SCROLL_TYPE_BOTTOM && nextProps.scrollType !== PostsView.SCROLL_TYPE_NEW_MESSAGE) {
+ if (this.props.postList.order[0] !== nextProps.postList.order[0] && nextProps.scrollType !== PostsView.SCROLL_TYPE_BOTTOM && nextProps.scrollType !== PostsView.SCROLL_TYPE_NEW_MESSAGE && nextProps.postList.posts[nextProps.postList.order[0]].user_id !== nextProps.currentUser.id && this.props.postList.order[1] !== nextProps.postList.order[0]) { // new message from another user and not deleted
this.setState({showUnreadMessageAlert: true});
} else if (nextProps.scrollType === PostsView.SCROLL_TYPE_BOTTOM) {
this.setState({showUnreadMessageAlert: false});