From 4dc03613b41b1e8a3cad77582fd4d80c6bf401f4 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 24 Mar 2017 16:46:39 -0400 Subject: Check if LHS DM list needs updating on channel switch and channel members fetch (#5861) --- webapp/actions/global_actions.jsx | 2 ++ webapp/components/needs_team.jsx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx index c81478069..1f22cd773 100644 --- a/webapp/actions/global_actions.jsx +++ b/webapp/actions/global_actions.jsx @@ -65,6 +65,8 @@ export function emitChannelClickEvent(channel) { BrowserStore.setGlobalItem(chan.team_id, chan.id); + loadProfilesForSidebar(); + AppDispatcher.handleViewAction({ type: ActionTypes.CLICK_CHANNEL, name: chan.name, diff --git a/webapp/components/needs_team.jsx b/webapp/components/needs_team.jsx index 11e75bfb7..9ce4ed882 100644 --- a/webapp/components/needs_team.jsx +++ b/webapp/components/needs_team.jsx @@ -16,6 +16,7 @@ import PostStore from 'stores/post_store.jsx'; import * as GlobalActions from 'actions/global_actions.jsx'; import {startPeriodicStatusUpdates, stopPeriodicStatusUpdates} from 'actions/status_actions.jsx'; import {startPeriodicSync, stopPeriodicSync} from 'actions/websocket_actions.jsx'; +import {loadProfilesForSidebar} from 'actions/user_actions.jsx'; import Constants from 'utils/constants.jsx'; const TutorialSteps = Constants.TutorialSteps; @@ -108,7 +109,7 @@ export default class NeedsTeam extends React.Component { window.isActive = true; if (new Date().getTime() - this.blurTime > UNREAD_CHECK_TIME_MILLISECONDS) { - AsyncClient.getMyChannelMembers(); + AsyncClient.getMyChannelMembers().then(loadProfilesForSidebar); } }); -- cgit v1.2.3-1-g7c22