Allow clients to fetch statuses made while they were offline (#6876)
This commit is contained in:
parent
59657e24b9
commit
9a1a55ce52
22 changed files with 191 additions and 259 deletions
|
@ -4,10 +4,7 @@ import PropTypes from 'prop-types';
|
|||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Column from '../../components/column';
|
||||
import ColumnHeader from '../../components/column_header';
|
||||
import {
|
||||
refreshCommunityTimeline,
|
||||
expandCommunityTimeline,
|
||||
} from '../../actions/timelines';
|
||||
import { expandCommunityTimeline } from '../../actions/timelines';
|
||||
import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import ColumnSettingsContainer from './containers/column_settings_container';
|
||||
|
@ -55,7 +52,7 @@ export default class CommunityTimeline extends React.PureComponent {
|
|||
componentDidMount () {
|
||||
const { dispatch } = this.props;
|
||||
|
||||
dispatch(refreshCommunityTimeline());
|
||||
dispatch(expandCommunityTimeline());
|
||||
this.disconnect = dispatch(connectCommunityStream());
|
||||
}
|
||||
|
||||
|
@ -70,8 +67,8 @@ export default class CommunityTimeline extends React.PureComponent {
|
|||
this.column = c;
|
||||
}
|
||||
|
||||
handleLoadMore = () => {
|
||||
this.props.dispatch(expandCommunityTimeline());
|
||||
handleLoadMore = maxId => {
|
||||
this.props.dispatch(expandCommunityTimeline({ maxId }));
|
||||
}
|
||||
|
||||
render () {
|
||||
|
@ -97,7 +94,7 @@ export default class CommunityTimeline extends React.PureComponent {
|
|||
trackScroll={!pinned}
|
||||
scrollKey={`community_timeline-${columnId}`}
|
||||
timelineId='community'
|
||||
loadMore={this.handleLoadMore}
|
||||
onLoadMore={this.handleLoadMore}
|
||||
emptyMessage={<FormattedMessage id='empty_column.community' defaultMessage='The local timeline is empty. Write something publicly to get the ball rolling!' />}
|
||||
/>
|
||||
</Column>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue