diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-05-02 09:28:44 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-05-02 09:28:44 -0400 |
commit | 042052aec61b8c51751cb3aeb27c6c21ecf16416 (patch) | |
tree | cedfee7c1ddecacdddc155a453f33b717b233490 /webapp/stores/team_store.jsx | |
parent | 294bd0825550cd8de557a8b36facfc601f32bd82 (diff) | |
download | chat-042052aec61b8c51751cb3aeb27c6c21ecf16416.tar.gz chat-042052aec61b8c51751cb3aeb27c6c21ecf16416.tar.bz2 chat-042052aec61b8c51751cb3aeb27c6c21ecf16416.zip |
Improve perf for channel switching, fix team switching issues (#6286)
* Improve perf for channel switching, fix team switching issues
* Fix last channel when switching teams
Diffstat (limited to 'webapp/stores/team_store.jsx')
-rw-r--r-- | webapp/stores/team_store.jsx | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/webapp/stores/team_store.jsx b/webapp/stores/team_store.jsx index f017c411e..2dc034199 100644 --- a/webapp/stores/team_store.jsx +++ b/webapp/stores/team_store.jsx @@ -342,20 +342,6 @@ class TeamStoreClass extends EventEmitter { return false; } - updateUnreadCount(teamId, totalMsgCount, channelMember) { - let member = this.getMyTeamMembers().filter((m) => m.team_id === teamId)[0]; - if (member) { - member = Object.assign({}, member); - member.msg_count -= (totalMsgCount - channelMember.msg_count); - member.mention_count -= channelMember.mention_count; - - store.dispatch({ - type: TeamTypes.RECEIVED_MY_TEAM_MEMBER, - data: member - }); - } - } - subtractUnread(teamId, msgs, mentions) { let member = this.getMyTeamMembers().filter((m) => m.team_id === teamId)[0]; if (member) { @@ -443,11 +429,6 @@ TeamStore.dispatchToken = AppDispatcher.register((payload) => { case ActionTypes.RECEIVED_TEAM_STATS: TeamStore.saveStats(action.team_id, action.stats); break; - case ActionTypes.CLICK_CHANNEL: - if (action.channelMember) { - TeamStore.updateUnreadCount(action.team_id, action.total_msg_count, action.channelMember); - } - break; case ActionTypes.RECEIVED_POST: if (action.post.type === PostTypes.JOIN_LEAVE || action.post.type === PostTypes.JOIN_CHANNEL || action.post.type === PostTypes.LEAVE_CHANNEL) { return; |