Этот коммит содержится в:
JoramWilander
2016-02-01 08:01:49 -05:00
родитель 0b022b130a
Коммит 12efe8675e
2 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@@ -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;
}
}
}

Просмотреть файл

@@ -182,7 +182,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();