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.jsx19
1 files changed, 11 insertions, 8 deletions
diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx
index 0e2c43a60..af7238267 100644
--- a/webapp/stores/channel_store.jsx
+++ b/webapp/stores/channel_store.jsx
@@ -4,6 +4,8 @@
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
import EventEmitter from 'events';
+import TeamStore from 'stores/team_store.jsx';
+
var Utils;
import {ActionTypes, Constants} from 'utils/constants.jsx';
const NotificationPrefs = Constants.NotificationPrefs;
@@ -233,24 +235,25 @@ class ChannelStoreClass extends EventEmitter {
return this.myChannelMembers;
}
- storeMoreChannels(channels) {
+ storeMoreChannels(channels, teamId = TeamStore.getCurrentId()) {
const newChannels = {};
for (let i = 0; i < channels.length; i++) {
newChannels[channels[i].id] = channels[i];
}
- this.moreChannels = Object.assign({}, this.moreChannels, newChannels);
+ this.moreChannels[teamId] = Object.assign({}, this.moreChannels[teamId], newChannels);
}
- removeMoreChannel(channelId) {
- Reflect.deleteProperty(this.moreChannels, channelId);
+ removeMoreChannel(channelId, teamId = TeamStore.getCurrentId()) {
+ Reflect.deleteProperty(this.moreChannels[teamId], channelId);
}
- getMoreChannels() {
- return Object.assign({}, this.moreChannels);
+ getMoreChannels(teamId = TeamStore.getCurrentId()) {
+ return Object.assign({}, this.moreChannels[teamId]);
}
- getMoreChannelsList() {
- return Object.keys(this.moreChannels).map((cid) => this.moreChannels[cid]);
+ getMoreChannelsList(teamId = TeamStore.getCurrentId()) {
+ const teamChannels = this.moreChannels[teamId] || {};
+ return Object.keys(teamChannels).map((cid) => teamChannels[cid]);
}
storeStats(stats) {