diff options
-rw-r--r-- | webapp/actions/global_actions.jsx | 1 | ||||
-rw-r--r-- | webapp/stores/channel_store.jsx | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx index f1714def2..9dd3eff35 100644 --- a/webapp/actions/global_actions.jsx +++ b/webapp/actions/global_actions.jsx @@ -490,6 +490,7 @@ export function clientLogout(redirectTo = '/') { PreferenceStore.clear(); UserStore.clear(); TeamStore.clear(); + ChannelStore.clear(); newLocalizationSelected(global.window.mm_config.DefaultClientLocale); stopPeriodicStatusUpdates(); WebsocketActions.close(); diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx index 0264ada4a..c93edf7f4 100644 --- a/webapp/stores/channel_store.jsx +++ b/webapp/stores/channel_store.jsx @@ -17,9 +17,11 @@ const LAST_VIEVED_EVENT = 'last_viewed'; class ChannelStoreClass extends EventEmitter { constructor(props) { super(props); - this.setMaxListeners(600); + this.clear(); + } + clear() { this.currentId = null; this.postMode = this.POST_MODE_CHANNEL; this.channels = []; |