summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-06-29 09:37:57 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2017-06-29 09:37:57 -0400
commitbef07fc53eb5cf77ee152a24de002b9289503a4a (patch)
tree136ddae857fdafe1e119ac388d7a845c32ed173f /webapp
parent227586e09af8c1ad1466a72078e5644d8368797f (diff)
downloadchat-bef07fc53eb5cf77ee152a24de002b9289503a4a.tar.gz
chat-bef07fc53eb5cf77ee152a24de002b9289503a4a.tar.bz2
chat-bef07fc53eb5cf77ee152a24de002b9289503a4a.zip
Fix sidebar status not updating (#6752)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/sidebar.jsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx
index 040f12c26..8c959c397 100644
--- a/webapp/components/sidebar.jsx
+++ b/webapp/components/sidebar.jsx
@@ -45,7 +45,7 @@ const dispatch = store.dispatch;
const getState = store.getState;
import {getMyPreferences} from 'mattermost-redux/selectors/entities/preferences';
-import {getUsers} from 'mattermost-redux/selectors/entities/users';
+import {getUsers, getUserStatuses} from 'mattermost-redux/selectors/entities/users';
import {savePreferences} from 'mattermost-redux/actions/preferences';
export default class Sidebar extends React.Component {
@@ -108,10 +108,12 @@ export default class Sidebar extends React.Component {
const channels = ChannelStore.getAll();
const preferences = getMyPreferences(store.getState());
const profiles = getUsers(store.getState());
+ const statuses = getUserStatuses(store.getState());
let displayableChannels = {};
if (!Utils.areObjectsEqual(channels, this.oldChannels) ||
!Utils.areObjectsEqual(preferences, this.oldPreferences) ||
- !Utils.areObjectsEqual(profiles, this.oldProfiles)) {
+ !Utils.areObjectsEqual(profiles, this.oldProfiles) ||
+ !Utils.areObjectsEqual(statuses, this.oldStatuses)) {
const channelsArray = channels.map((channel) => Object.assign({}, channel));
displayableChannels = ChannelUtils.buildDisplayableChannelList(channelsArray);
displayableChannels.favoriteChannels.sort(sortTeamsByDisplayName);
@@ -119,6 +121,7 @@ export default class Sidebar extends React.Component {
this.oldChannels = channels;
this.oldPreferences = preferences;
this.oldProfiles = profiles;
+ this.oldStatuses = statuses;
return {
activeId: currentChannelId,