diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-11-23 10:01:45 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-23 10:01:45 -0500 |
commit | 4b3a3941e04803539f39c057a5c0d44cd30699be (patch) | |
tree | fb6324a5896da7123b76854e7eb504c239113824 /web/react/utils/utils.jsx | |
parent | 5ee226d7f92d9408736b0e2a9ff105eb6f520a19 (diff) | |
parent | 9e8cd937908d5d2e730e94f761d6533eb2d95e28 (diff) | |
download | chat-4b3a3941e04803539f39c057a5c0d44cd30699be.tar.gz chat-4b3a3941e04803539f39c057a5c0d44cd30699be.tar.bz2 chat-4b3a3941e04803539f39c057a5c0d44cd30699be.zip |
Merge pull request #1475 from mattermost/plt-90
PLT-90 PLT-88 PLT-1109 PLT-1167 Implementing Permalinks, Jump to post from search, Performace Improvements.
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r-- | web/react/utils/utils.jsx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 668d8100f..764bdf763 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -2,6 +2,7 @@ // See License.txt for license information. import AppDispatcher from '../dispatcher/app_dispatcher.jsx'; +import * as EventHelpers from '../dispatcher/event_helpers.jsx'; import ChannelStore from '../stores/channel_store.jsx'; import UserStore from '../stores/user_store.jsx'; import PreferenceStore from '../stores/preference_store.jsx'; @@ -839,23 +840,15 @@ export function isValidUsername(name) { } export function updateAddressBar(channelName) { - var teamURL = window.location.href.split('/channels')[0]; + const teamURL = TeamStore.getCurrentTeamUrl(); history.replaceState('data', '', teamURL + '/channels/' + channelName); } export function switchChannel(channel) { - AppDispatcher.handleViewAction({ - type: ActionTypes.CLICK_CHANNEL, - name: channel.name, - id: channel.id - }); + EventHelpers.emitChannelClickEvent(channel); updateAddressBar(channel.name); - AsyncClient.getChannels(true, true, true); - AsyncClient.getChannelExtraInfo(true); - AsyncClient.getPosts(channel.id); - $('.inner__wrap').removeClass('move--right'); $('.sidebar--left').removeClass('move--right'); |