Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
[PLT-6656] Migrating sidebar.jsx to redux/PureComponent (#422)
Browse files Browse the repository at this point in the history
* [PLT-6656] Splitting LHS in subcomponents

* [PLT-6656] Migrating sidebar.jsx to redux/PureComponent

* Fixed comments proposed by @jwilander and @hmhealey
  • Loading branch information
jespino authored and jwilander committed Jan 8, 2018
1 parent daaceb9 commit 8476ffd
Show file tree
Hide file tree
Showing 23 changed files with 6,468 additions and 1,087 deletions.
7 changes: 6 additions & 1 deletion actions/channel_actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {browserHistory} from 'react-router';
import * as ChannelActions from 'mattermost-redux/actions/channels';
import {deletePreferences, savePreferences} from 'mattermost-redux/actions/preferences';
import {Client4} from 'mattermost-redux/client';
import {getMyChannelMemberships} from 'mattermost-redux/selectors/entities/channels';
import {getMyChannelMemberships, getChannel} from 'mattermost-redux/selectors/entities/channels';

import {actionOnGlobalItemsWithPrefix} from 'actions/storage';

Expand All @@ -29,6 +29,11 @@ import {isUrlSafe} from 'utils/url.jsx';
const dispatch = store.dispatch;
const getState = store.getState;

export function goToChannelById(channelId) {
const channel = getChannel(getState(), channelId);
browserHistory.push(TeamStore.getCurrentTeamRelativeUrl() + '/channels/' + channel.name);
}

export function goToChannel(channel) {
if (channel.fake) {
const user = UserStore.getProfileByUsername(channel.display_name);
Expand Down
Loading

0 comments on commit 8476ffd

Please sign in to comment.