Keep timelines in the UI trimmed when possible
This commit is contained in:
parent
b14b5e3b44
commit
565cd95bca
6 changed files with 113 additions and 41 deletions
|
@ -1,16 +1,25 @@
|
|||
import { connect } from 'react-redux';
|
||||
import StatusList from '../../../components/status_list';
|
||||
import { expandTimeline } from '../../../actions/timelines';
|
||||
import { expandTimeline, scrollTopTimeline } from '../../../actions/timelines';
|
||||
import Immutable from 'immutable';
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
statusIds: state.getIn(['timelines', props.type], Immutable.List())
|
||||
statusIds: state.getIn(['timelines', props.type, 'items'], Immutable.List())
|
||||
});
|
||||
|
||||
const mapDispatchToProps = function (dispatch, props) {
|
||||
return {
|
||||
onScrollToBottom () {
|
||||
dispatch(scrollTopTimeline(props.type, false));
|
||||
dispatch(expandTimeline(props.type, props.id));
|
||||
},
|
||||
|
||||
onScrollToTop () {
|
||||
dispatch(scrollTopTimeline(props.type, true));
|
||||
},
|
||||
|
||||
onScroll () {
|
||||
dispatch(scrollTopTimeline(props.type, false));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue