mattermost-mobile/app/components/post_list/index.js
Harrison Healey 4574a54241 RN-219 Attempting to fix missing posts (#653)
* RN-219 Changed loadPostsIfNecessary to get since latest Post.CreateAt

* RN-219 Changed post list refresh to always get the latest page of posts

* Updated yarn.lock
2017-06-20 09:32:55 -04:00

34 lines
883 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 {setChannelRefreshing} from 'app/actions/views/channel';
import {getTheme} from 'app/selectors/preferences';
import {getPosts} from 'mattermost-redux/actions/posts';
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({
getPosts,
setChannelRefreshing
}, dispatch)
};
}
export default connect(mapStateToProps, mapDispatchToProps)(PostList);