* Re-factor postlist with VirtualizedList * Remove react-native-invertible-scroll-view dependency * Fix navigator not being pass to post * Feedback review * Feedback second review
31 lines
791 B
JavaScript
31 lines
791 B
JavaScript
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import {bindActionCreators} from 'redux';
|
|
import {connect} from 'react-redux';
|
|
|
|
import {refreshChannel} from 'app/actions/views/channel';
|
|
import {getTheme} from 'app/selectors/preferences';
|
|
|
|
import PostList from './post_list';
|
|
|
|
function mapStateToProps(state, ownProps) {
|
|
const {loading, refreshing} = state.views.channel;
|
|
|
|
return {
|
|
...ownProps,
|
|
channelIsLoading: loading,
|
|
refreshing,
|
|
theme: getTheme(state)
|
|
};
|
|
}
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
return {
|
|
actions: bindActionCreators({
|
|
refreshChannel
|
|
}, dispatch)
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(PostList);
|