summaryrefslogtreecommitdiffstats
path: root/webapp/stores/channel_store.jsx
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-12-19 10:05:46 -0300
committerJoram Wilander <jwawilander@gmail.com>2016-12-19 08:05:46 -0500
commit999d1553e1ce45adf58f6082b160bc1147dc592b (patch)
tree369a9b7f46dd44d136a79a050469429169433cec /webapp/stores/channel_store.jsx
parent3ce2ce9dc882ed962dc3ce7550bdb07963f376b6 (diff)
downloadchat-999d1553e1ce45adf58f6082b160bc1147dc592b.tar.gz
chat-999d1553e1ce45adf58f6082b160bc1147dc592b.tar.bz2
chat-999d1553e1ce45adf58f6082b160bc1147dc592b.zip
PLT-4167 Team Sidebar (#4569)
* PLT-4167 Team Sidebar * Address feedback from PM * change route from my_members to members * bug fixes * Updating styles for teams sidebar (#4681) * Added PM changes * Fix corner cases * Addressing feedback * use two different endpoints * Bug fixes * Rename model and client functions, using preferences to store last team and channel viewed * Fix mobile notification count and closing the team sidebar * unit test, fixed bad merge and retrieve from cached when available * bug fixes * use id for last channel in preferences, query optimization * Updating multi team css (#4830)
Diffstat (limited to 'webapp/stores/channel_store.jsx')
-rw-r--r--webapp/stores/channel_store.jsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx
index af7238267..0264ada4a 100644
--- a/webapp/stores/channel_store.jsx
+++ b/webapp/stores/channel_store.jsx
@@ -215,6 +215,10 @@ class ChannelStoreClass extends EventEmitter {
return this.channels;
}
+ getChannelById(id) {
+ return this.channels.filter((c) => c.id === id)[0];
+ }
+
storeMyChannelMember(channelMember) {
const members = Object.assign({}, this.getMyMembers());
members[channelMember.channel_id] = channelMember;
@@ -348,7 +352,6 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => {
switch (action.type) {
case ActionTypes.CLICK_CHANNEL:
ChannelStore.setCurrentId(action.id);
- ChannelStore.resetCounts(action.id);
ChannelStore.setPostMode(ChannelStore.POST_MODE_CHANNEL);
ChannelStore.emitChange();
break;