Finally fixed the git weirdness

Этот коммит содержится в:
nickago
2015-07-01 12:41:36 -07:00
родитель 5e204030ff
Коммит fd310e382a
4 изменённых файлов: 27 добавлений и 14 удалений

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

@@ -269,13 +269,8 @@ var SidebarLoggedIn = React.createClass({
var channel = ChannelStore.getCurrent();
if (channel) {
if (channel.type === 'D') {
userIds = channel.name.split('__');
if (userIds.length < 2) return;
if (userIds[0] == UserStore.getCurrentId() && UserStore.getProfile(userIds[1])) {
document.title = UserStore.getProfile(userIds[1]).username + " " + document.title.substring(document.title.lastIndexOf("-"));
} else if (userIds[1] == UserStore.getCurrentId() && UserStore.getProfile(userIds[0])) {
document.title = UserStore.getProfile(userIds[0]).username + " " + document.title.substring(document.title.lastIndexOf("-"));
}
var teammate_username = utils.getDirectTeammate(channel.id).username
document.title = teammate_username + " " + document.title.substring(document.title.lastIndexOf("-"));
} else {
document.title = channel.display_name + " " + document.title.substring(document.title.lastIndexOf("-"))
}