diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-05-03 11:54:47 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-05-03 08:54:47 -0700 |
commit | 6a6c5365d335666b5f76b92d1f41314e6873197f (patch) | |
tree | a9e2665ae7f3bb8401d93194b8549edada7c79de /webapp | |
parent | aa65478445b79fd8fa9f5ceadd7715e8ba3a9576 (diff) | |
download | chat-6a6c5365d335666b5f76b92d1f41314e6873197f.tar.gz chat-6a6c5365d335666b5f76b92d1f41314e6873197f.tar.bz2 chat-6a6c5365d335666b5f76b92d1f41314e6873197f.zip |
Fix DMs not being removed until re-render (#6305)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/more_direct_channels/more_direct_channels.jsx | 1 | ||||
-rw-r--r-- | webapp/components/sidebar.jsx | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/webapp/components/more_direct_channels/more_direct_channels.jsx b/webapp/components/more_direct_channels/more_direct_channels.jsx index 50e2c4e48..768e802a3 100644 --- a/webapp/components/more_direct_channels/more_direct_channels.jsx +++ b/webapp/components/more_direct_channels/more_direct_channels.jsx @@ -42,6 +42,7 @@ export default class MoreDirectChannels extends React.Component { this.handleExit = this.handleExit.bind(this); this.handleSubmit = this.handleSubmit.bind(this); this.handleDelete = this.handleDelete.bind(this); + this.handlePageChange = this.handlePageChange.bind(this); this.onChange = this.onChange.bind(this); this.search = this.search.bind(this); this.addValue = this.addValue.bind(this); diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx index 7d3ab148e..b48d5a8f5 100644 --- a/webapp/components/sidebar.jsx +++ b/webapp/components/sidebar.jsx @@ -40,6 +40,9 @@ import {browserHistory, Link} from 'react-router/es6'; import favicon from 'images/favicon/favicon-16x16.png'; import redFavicon from 'images/favicon/redfavicon-16x16.png'; +import store from 'stores/redux_store.jsx'; +import * as Selectors from 'mattermost-redux/selectors/entities/preferences'; + export default class Sidebar extends React.Component { constructor(props) { super(props); @@ -117,12 +120,14 @@ export default class Sidebar extends React.Component { const tutorialStep = PreferenceStore.getInt(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), 999); const channels = ChannelStore.getAll(); + const preferences = Selectors.getMyPreferences(store.getState()); let displayableChannels = {}; - if (channels !== this.oldChannels) { + if (channels !== this.oldChannels || preferences !== this.oldPreferences) { const channelsArray = channels.map((channel) => Object.assign({}, channel)); displayableChannels = ChannelUtils.buildDisplayableChannelList(channelsArray); } this.oldChannels = channels; + this.oldPreferences = preferences; return { activeId: currentChannelId, |