summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
authorCompaurum <Compaurum@users.noreply.github.com>2016-05-02 15:07:46 +0300
committerChristopher Speller <crspeller@gmail.com>2016-05-02 08:07:46 -0400
commit3346a9a63a7c1db582b2f553269c64f4b4a356ef (patch)
treef50adf0a655f78fa58b297b781f366b976afca19 /webapp/components
parentf817e3c89aae50fbc30868da8fb6626cc2fb8c73 (diff)
downloadchat-3346a9a63a7c1db582b2f553269c64f4b4a356ef.tar.gz
chat-3346a9a63a7c1db582b2f553269c64f4b4a356ef.tar.bz2
chat-3346a9a63a7c1db582b2f553269c64f4b4a356ef.zip
PLT-2586 Fixed problem when New Messages indicator is triggered by own message (#2816)
* Fixed problem when New Messages indicator is triggered by own message * changed to styleguide
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});