diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-03-09 14:41:03 -0500 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-03-09 19:41:03 +0000 |
commit | 9c13863f484e9741adf4179cb6b95ee4af8ec343 (patch) | |
tree | d21b1021642124dee6f03188c83c75563ddfda8a /webapp | |
parent | 6ff46f30509819d518799561f66358dcd1ec4230 (diff) | |
download | chat-9c13863f484e9741adf4179cb6b95ee4af8ec343.tar.gz chat-9c13863f484e9741adf4179cb6b95ee4af8ec343.tar.bz2 chat-9c13863f484e9741adf4179cb6b95ee4af8ec343.zip |
Fix GMs showing up on refresh after being hidden (#5702)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/actions/user_actions.jsx | 2 | ||||
-rw-r--r-- | webapp/stores/notification_store.jsx | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx index b5f14577f..231b09f11 100644 --- a/webapp/actions/user_actions.jsx +++ b/webapp/actions/user_actions.jsx @@ -304,7 +304,7 @@ export function loadProfilesForGM() { if (!isVisible) { const member = ChannelStore.getMyMember(channel.id); - if (!member || (member.mention_count === 0 && member.msg_count < member.total_msg_count)) { + if (!member || (member.mention_count === 0 && member.msg_count >= channel.total_msg_count)) { continue; } diff --git a/webapp/stores/notification_store.jsx b/webapp/stores/notification_store.jsx index f32e71047..f32107ef7 100644 --- a/webapp/stores/notification_store.jsx +++ b/webapp/stores/notification_store.jsx @@ -82,6 +82,10 @@ class NotificationStoreClass extends EventEmitter { title = channel.display_name; } + if (title === '') { + title = msgProps.channel_display_name; + } + let notifyText = post.message.replace(/\n+/g, ' '); if (notifyText.length > 50) { notifyText = notifyText.substring(0, 49) + '...'; |