mattermost-mobile/app/scenes/channel/channel_container.js
Harrison Healey cea81f6497 Reorganized navigation (#181)
* Moved ChannelDrawer into its own scene

* Moved RightSideMenu to a separate route

* Moved title back above scenes

* Moved right side menu into a separate scene

* Reorganized navigation so that it centers around ChannelView when logged in

* Stopped using NavigationExperimental to manage drawers

* Fixed copyright date

* Added unit tests for navigation drawers

* Renamed RightSideMenu to RightMenuDrawer

* Removed unnecessary ChannelDrawer style
2017-01-24 11:56:35 -03:00

49 lines
1.4 KiB
JavaScript

// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {
goToChannelInfo,
openChannelDrawer,
openRightMenuDrawer
} from 'app/actions/navigation';
import {
loadChannelsIfNecessary,
loadProfilesAndTeamMembersForDMSidebar,
selectInitialChannel,
handlePostDraftChanged
} from 'app/actions/views/channel';
import {getCurrentChannel} from 'service/selectors/entities/channels';
import {getTheme} from 'service/selectors/entities/preferences';
import {getCurrentTeam} from 'service/selectors/entities/teams';
import Channel from './channel';
function mapStateToProps(state, ownProps) {
return {
...ownProps,
...state.views.channel,
currentTeam: getCurrentTeam(state),
currentChannel: getCurrentChannel(state),
theme: getTheme(state)
};
}
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({
loadChannelsIfNecessary,
loadProfilesAndTeamMembersForDMSidebar,
selectInitialChannel,
openChannelDrawer,
openRightMenuDrawer,
handlePostDraftChanged,
goToChannelInfo
}, dispatch)
};
}
export default connect(mapStateToProps, mapDispatchToProps)(Channel);