PLT-4491 Fix navbar title for dm channels on mobile (#4394)
Этот коммит содержится в:
коммит произвёл
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) {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user