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