PLT-4491 Fix navbar title for dm channels on mobile (#4394)

Этот коммит содержится в:
Thomas Hopkins
2016-11-01 09:06:25 -07:00
коммит произвёл Corey Hulen
родитель aa6cb03b20
Коммит ef53aa1e7f

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

@@ -688,17 +688,8 @@ export default class Navbar extends React.Component {
channelTitle = channel.display_name; channelTitle = channel.display_name;
} else if (channel.type === 'D') { } else if (channel.type === 'D') {
isDirect = true; isDirect = true;
if (this.state.users.length > 1) { const teammateId = Utils.getUserIdFromChannelName(channel);
let p; channelTitle = Utils.displayUsername(teammateId);
if (this.state.users[0].id === currentId) {
p = UserStore.getProfile(this.state.users[1].id);
} else {
p = UserStore.getProfile(this.state.users[0].id);
}
if (p != null) {
channelTitle = p.username;
}
}
} }
if (channel.header.length === 0) { if (channel.header.length === 0) {