2016-11-05 15:20:05 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import StatusList from '../../../components/status_list';
|
|
|
|
import { expandTimeline } from '../../../actions/timelines';
|
|
|
|
import Immutable from 'immutable';
|
2016-09-04 14:04:26 +02:00
|
|
|
|
2016-10-24 17:11:02 +02:00
|
|
|
const mapStateToProps = (state, props) => ({
|
2016-11-05 15:20:05 +01:00
|
|
|
statusIds: state.getIn(['timelines', props.type], Immutable.List())
|
2016-10-24 17:11:02 +02:00
|
|
|
});
|
2016-08-24 17:56:44 +02:00
|
|
|
|
2016-09-22 01:08:35 +02:00
|
|
|
const mapDispatchToProps = function (dispatch, props) {
|
2016-08-31 22:58:10 +02:00
|
|
|
return {
|
2016-09-30 00:00:45 +02:00
|
|
|
onScrollToBottom () {
|
2016-11-05 15:20:05 +01:00
|
|
|
dispatch(expandTimeline(props.type, props.id));
|
2016-08-31 22:58:10 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-10-24 17:11:02 +02:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(StatusList);
|