diff options
author | Corey Hulen <corey@hulen.com> | 2016-03-29 08:08:25 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-03-29 08:08:25 -0700 |
commit | d921c112de622c1919650bc919d32681112cf3a9 (patch) | |
tree | 9103b0d16fa676f15591f9704fa62f673aa23cac /webapp/utils/utils.jsx | |
parent | 4a6edbfd0854c097cf8fb64a3ddd75b43dfcd401 (diff) | |
parent | 5ce1a4368bafbd2ed50b1953658fca285cfd349b (diff) | |
download | chat-d921c112de622c1919650bc919d32681112cf3a9.tar.gz chat-d921c112de622c1919650bc919d32681112cf3a9.tar.bz2 chat-d921c112de622c1919650bc919d32681112cf3a9.zip |
Merge pull request #2558 from mattermost/center-panel-refactor
PLT-2382, PLT-2386, PLT-2455 Channel/permalink view cleanup and fixes.
Diffstat (limited to 'webapp/utils/utils.jsx')
-rw-r--r-- | webapp/utils/utils.jsx | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index ac12edb82..dcf0cf740 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -169,7 +169,7 @@ export function notifyMe(title, body, channel) { notification.onclick = () => { window.focus(); if (channel) { - switchChannel(channel); + GlobalActions.emitChannelClickEvent(channel); } else { browserHistory.push(TeamStore.getCurrentTeamUrl() + '/channels/town-square'); } @@ -957,24 +957,6 @@ export function isValidUsername(name) { return error; } -export function updateAddressBar(channelName) { - const teamURL = TeamStore.getCurrentTeamUrl(); - history.replaceState('data', '', teamURL + '/channels/' + channelName); -} - -export function switchChannel(channel) { - GlobalActions.emitChannelClickEvent(channel); - - updateAddressBar(channel.name); - - $('.inner-wrap').removeClass('move--right'); - $('.sidebar--left').removeClass('move--right'); - - client.trackPage(); - - return false; -} - export function isMobile() { return screen.width <= 768; } @@ -1253,7 +1235,7 @@ export function importSlack(file, success, error) { } export function getTeamURLFromAddressBar() { - return window.location.href.split('/channels')[0]; + return window.location.origin + '/' + window.location.pathname.split('/')[1]; } export function getShortenedTeamURL() { |