diff options
Diffstat (limited to 'webapp/components/sidebar.jsx')
-rw-r--r-- | webapp/components/sidebar.jsx | 7 |
1 files changed, 6 insertions, 1 deletions
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, |