mattermost-mobile/app/components/post_list/index.js
enahum 7aa4fbd4a5 RN-136 Post list pull to refresh (#558)
* Fix post list inverted issue

* Add pull to refresh to post list
2017-05-22 08:09:52 -04:00

32 lines
859 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 {loadPostsIfNecessary, setChannelRefreshing} 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({
loadPostsIfNecessary,
setChannelRefreshing
}, dispatch)
};
}
export default connect(mapStateToProps, mapDispatchToProps)(PostList);