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;
} else if (channel.type === 'D') {
isDirect = true;
if (this.state.users.length > 1) {
let p;
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;
}
}
const teammateId = Utils.getUserIdFromChannelName(channel);
channelTitle = Utils.displayUsername(teammateId);
}
if (channel.header.length === 0) {