diff options
author | Corey Hulen <corey@hulen.com> | 2015-09-29 09:46:37 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-09-29 09:46:37 -0700 |
commit | 317dc0ea2655d7616bdd23dc07b011bdaf070a8e (patch) | |
tree | df81514a203c1c02a1b0931dc5a35d774cbf8c45 /web/react/utils | |
parent | 2c11cbc266b87e7596c628b414e9229a534411a8 (diff) | |
parent | 558f8a322feba9fa22509a58a01411225c81b469 (diff) | |
download | chat-317dc0ea2655d7616bdd23dc07b011bdaf070a8e.tar.gz chat-317dc0ea2655d7616bdd23dc07b011bdaf070a8e.tar.bz2 chat-317dc0ea2655d7616bdd23dc07b011bdaf070a8e.zip |
Merge pull request #843 from rgarmsen2295/plt-138
PLT-138 Better parsing of the site's title when viewing a channel
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/utils.jsx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 9425f3ea6..be11c2e40 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -637,16 +637,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, @@ -655,12 +651,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); |