Removed unused title update code
Этот коммит содержится в:
@@ -43,7 +43,7 @@ export default class MoreDirectChannels extends React.Component {
|
||||
|
||||
handleClick = function clickHandler(e) {
|
||||
e.preventDefault();
|
||||
utils.switchChannel(channel, channel.teammate_username);
|
||||
utils.switchChannel(channel);
|
||||
$(React.findDOMNode(self.refs.modal)).modal('hide');
|
||||
};
|
||||
} else {
|
||||
|
||||
@@ -78,7 +78,6 @@ export default class RenameChannelModal extends React.Component {
|
||||
$(React.findDOMNode(this.refs.modal)).modal('hide');
|
||||
|
||||
AsyncClient.getChannel(channel.id);
|
||||
Utils.updateTabTitle(channel.display_name);
|
||||
Utils.updateAddressBar(channel.name);
|
||||
|
||||
React.findDOMNode(this.refs.displayName).value = '';
|
||||
|
||||
@@ -47,13 +47,8 @@ export default class SearchResultsItem extends React.Component {
|
||||
);
|
||||
|
||||
var postChannel = ChannelStore.get(this.props.post.channel_id);
|
||||
var teammate = '';
|
||||
|
||||
if (postChannel.type === 'D') {
|
||||
teammate = utils.getDirectTeammate(this.props.post.channel_id).username;
|
||||
}
|
||||
|
||||
utils.switchChannel(postChannel, teammate);
|
||||
utils.switchChannel(postChannel);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -790,16 +790,12 @@ export function isValidUsername(name) {
|
||||
return error;
|
||||
}
|
||||
|
||||
export function updateTabTitle(name) {
|
||||
document.title = name + ' ' + document.title.substring(document.title.lastIndexOf('-'));
|
||||
}
|
||||
|
||||
export function updateAddressBar(channelName) {
|
||||
var teamURL = window.location.href.split('/channels')[0];
|
||||
history.replaceState('data', '', teamURL + '/channels/' + channelName);
|
||||
}
|
||||
|
||||
export function switchChannel(channel, teammateName) {
|
||||
export function switchChannel(channel) {
|
||||
AppDispatcher.handleViewAction({
|
||||
type: ActionTypes.CLICK_CHANNEL,
|
||||
name: channel.name,
|
||||
@@ -808,12 +804,6 @@ export function switchChannel(channel, teammateName) {
|
||||
|
||||
updateAddressBar(channel.name);
|
||||
|
||||
if (channel.type === 'D' && teammateName) {
|
||||
updateTabTitle(teammateName);
|
||||
} else {
|
||||
updateTabTitle(channel.display_name);
|
||||
}
|
||||
|
||||
AsyncClient.getChannels(true, true, true);
|
||||
AsyncClient.getChannelExtraInfo(true);
|
||||
AsyncClient.getPosts(channel.id);
|
||||
|
||||
Ссылка в новой задаче
Block a user