11import { connect } from 'react-redux' ;
22import StatusList from '../../../components/status_list' ;
3- import { scrollTopTimeline , loadPending } from '../../../actions/timelines' ;
3+ import { scrollTopTimeline , loadPending , updateCurrentlyViewing } from '../../../actions/timelines' ;
44import { Map as ImmutableMap , List as ImmutableList } from 'immutable' ;
55import { createSelector } from 'reselect' ;
66import { debounce } from 'lodash' ;
@@ -39,6 +39,7 @@ const makeMapStateToProps = () => {
3939 isPartial : state . getIn ( [ 'timelines' , timelineId , 'isPartial' ] , false ) ,
4040 hasMore : state . getIn ( [ 'timelines' , timelineId , 'hasMore' ] ) ,
4141 numPending : getPendingStatusIds ( state , { type : timelineId } ) . size ,
42+ currentlyViewing : state . getIn ( [ 'timelines' , timelineId , 'currentlyViewing' ] , - 1 ) ,
4243 } ) ;
4344
4445 return mapStateToProps ;
@@ -56,6 +57,7 @@ const mapDispatchToProps = (dispatch, { timelineId }) => ({
5657
5758 onLoadPending : ( ) => dispatch ( loadPending ( timelineId ) ) ,
5859
60+ updateCurrentlyViewing : id => dispatch ( updateCurrentlyViewing ( timelineId , id ) ) ,
5961} ) ;
6062
6163export default connect ( makeMapStateToProps , mapDispatchToProps ) ( StatusList ) ;
0 commit comments