diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-01-03 12:37:47 -0500 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-01-03 12:37:47 -0500 |
commit | 2308499fa46a31b455663c164e218a5e3bae6042 (patch) | |
tree | 97c266f175452fb658196b41bf6bd173badd9e75 /webapp | |
parent | e74c66d7f6a1f515d2380d0f163b2958f03c2bc7 (diff) | |
download | chat-2308499fa46a31b455663c164e218a5e3bae6042.tar.gz chat-2308499fa46a31b455663c164e218a5e3bae6042.tar.bz2 chat-2308499fa46a31b455663c164e218a5e3bae6042.zip |
Fix unread for your own message after logout (#4943)
Diffstat (limited to 'webapp')
-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 = []; |