Pull to Refresh on public timelines

features-override
Alex Gleason 2021-11-04 13:41:56 -05:00
rodzic 9ce3aa8d1b
commit f61845b876
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -70,6 +70,12 @@ class CommunityTimeline extends React.PureComponent {
dispatch(expandCommunityTimeline({ maxId, onlyMedia }));
}
handleRefresh = () => {
const { dispatch, onlyMedia } = this.props;
return dispatch(expandCommunityTimeline({ onlyMedia }));
}
render() {
const { intl, onlyMedia, timelineId } = this.props;
@ -80,6 +86,7 @@ class CommunityTimeline extends React.PureComponent {
scrollKey={`${timelineId}_timeline`}
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
onLoadMore={this.handleLoadMore}
onRefresh={this.handleRefresh}
emptyMessage={<FormattedMessage id='empty_column.community' defaultMessage='The local timeline is empty. Write something publicly to get the ball rolling!' />}
/>
</Column>

Wyświetl plik

@ -94,6 +94,11 @@ class CommunityTimeline extends React.PureComponent {
dispatch(expandPublicTimeline({ maxId, onlyMedia }));
}
handleRefresh = () => {
const { dispatch, onlyMedia } = this.props;
return dispatch(expandPublicTimeline({ onlyMedia }));
}
render() {
const { intl, onlyMedia, timelineId, siteTitle, showExplanationBox, explanationBoxExpanded } = this.props;
@ -130,6 +135,7 @@ class CommunityTimeline extends React.PureComponent {
scrollKey={`${timelineId}_timeline`}
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
onLoadMore={this.handleLoadMore}
onRefresh={this.handleRefresh}
emptyMessage={<FormattedMessage id='empty_column.public' defaultMessage='There is nothing here! Write something publicly, or manually follow users from other servers to fill it up' />}
/>
</Column>