* Channel list drawer * Get channels by category * Fix and connect websocket * Fix Select first team using the team members * create loadMe and fix login actions to loads the teams * Add android back button handler for the channel drawer * Channel drawer styling and functionality * Mark channel as viewed and fixed reset unread counts * Unread above/below indicators * Improve performance replacing ScrollView with ListView * Fix unread indicators * Addressing review feedback
33 lines
1,002 B
JavaScript
33 lines
1,002 B
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 {selectChannel, viewChannel} from 'service/actions/channels';
|
|
import {getChannelsByCategory} from 'service/selectors/entities/channels';
|
|
import {closeChannelDrawer} from 'app/actions/views/drawer';
|
|
import ChannelDrawer from './channel_drawer';
|
|
|
|
function mapStateToProps(state, ownProps) {
|
|
const isOpen = state.views.drawer.channel;
|
|
const channelMembers = state.entities.channels.myMembers;
|
|
return {
|
|
...ownProps,
|
|
channels: getChannelsByCategory(state),
|
|
channelMembers,
|
|
isOpen
|
|
};
|
|
}
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
return {
|
|
actions: bindActionCreators({
|
|
selectChannel,
|
|
viewChannel,
|
|
closeChannelDrawer
|
|
}, dispatch)
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ChannelDrawer);
|