0
0
Fork 0

Add option to disable real-time updates in web UI (#9984)

Fix #9031
Fix #7913
This commit is contained in:
Eugen Rochko 2019-07-16 06:30:47 +02:00 committed by GitHub
parent 4562c3cb7e
commit 9b1d3e4acb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 181 additions and 70 deletions

View file

@ -1,6 +1,6 @@
import { connect } from 'react-redux';
import StatusList from '../../../components/status_list';
import { scrollTopTimeline } from '../../../actions/timelines';
import { scrollTopTimeline, loadPending } from '../../../actions/timelines';
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import { createSelector } from 'reselect';
import { debounce } from 'lodash';
@ -37,6 +37,7 @@ const makeMapStateToProps = () => {
isLoading: state.getIn(['timelines', timelineId, 'isLoading'], true),
isPartial: state.getIn(['timelines', timelineId, 'isPartial'], false),
hasMore: state.getIn(['timelines', timelineId, 'hasMore']),
numPending: state.getIn(['timelines', timelineId, 'pendingItems'], ImmutableList()).size,
});
return mapStateToProps;
@ -52,6 +53,8 @@ const mapDispatchToProps = (dispatch, { timelineId }) => ({
dispatch(scrollTopTimeline(timelineId, false));
}, 100),
onLoadPending: () => dispatch(loadPending(timelineId)),
});
export default connect(makeMapStateToProps, mapDispatchToProps)(StatusList);