Merge branch 'master' into fix-email

This commit is contained in:
=Corey Hulen
2016-02-01 08:44:50 -08:00
2 changed files with 10 additions and 3 deletions

View File

@@ -392,10 +392,14 @@ export default class Navbar extends React.Component {
} else if (channel.type === 'D') {
isDirect = true;
if (this.state.users.length > 1) {
let p;
if (this.state.users[0].id === currentId) {
channelTitle = UserStore.getProfile(this.state.users[1].id).username;
p = UserStore.getProfile(this.state.users[1].id);
} else {
channelTitle = UserStore.getProfile(this.state.users[0].id).username;
p = UserStore.getProfile(this.state.users[0].id);
}
if (p != null) {
channelTitle = p.username;
}
}
}

View File

@@ -185,7 +185,10 @@ export default class Sidebar extends React.Component {
let currentChannelName = channel.display_name;
if (channel.type === 'D') {
currentChannelName = Utils.getDirectTeammate(channel.id).username;
const teammate = Utils.getDirectTeammate(channel.id);
if (teammate != null) {
currentChannelName = teammate.username;
}
}
const unread = this.getTotalUnreadCount();