summaryrefslogtreecommitdiffstats
path: root/webapp/stores/team_store.jsx
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2017-02-27 16:26:38 -0300
committerCorey Hulen <corey@hulen.com>2017-02-27 14:26:38 -0500
commit4429e2f58c5ff3174c6b745e4c322ad790eb2f05 (patch)
treefd4530ef41b83d6133756e4bbeb5704f326bad7d /webapp/stores/team_store.jsx
parentb5ffdf5c5490ad1ac97ecb2725af878cda61810b (diff)
downloadchat-4429e2f58c5ff3174c6b745e4c322ad790eb2f05.tar.gz
chat-4429e2f58c5ff3174c6b745e4c322ad790eb2f05.tar.bz2
chat-4429e2f58c5ff3174c6b745e4c322ad790eb2f05.zip
PLT-5396 Fix team mention badge persistance (#5543)
Diffstat (limited to 'webapp/stores/team_store.jsx')
-rw-r--r--webapp/stores/team_store.jsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/webapp/stores/team_store.jsx b/webapp/stores/team_store.jsx
index 46f84bc1f..1601a684a 100644
--- a/webapp/stores/team_store.jsx
+++ b/webapp/stores/team_store.jsx
@@ -321,6 +321,14 @@ class TeamStoreClass extends EventEmitter {
}
}
+ subtractUnread(teamId, msgs, mentions) {
+ const member = this.my_team_members.filter((m) => m.team_id === teamId)[0];
+ if (member) {
+ member.msg_count -= msgs;
+ member.mention_count -= mentions;
+ }
+ }
+
incrementMessages(id, channelId) {
const channelMember = ChannelStore.getMyMember(channelId);
if (channelMember && channelMember.notify_props && channelMember.notify_props.mark_unread === NotificationPrefs.MENTION) {