summaryrefslogtreecommitdiffstats
path: root/webapp/stores/channel_store.jsx
diff options
context:
space:
mode:
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;