Browse Source

Make the refresh trends button refresh trends (#7685)

master
Eugen Rochko 6 years ago
committed by GitHub
parent
commit
0ce5339a7b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      app/javascript/mastodon/features/getting_started/index.js

+ 5
- 1
app/javascript/mastodon/features/getting_started/index.js View File

@ -82,6 +82,10 @@ export default class GettingStarted extends ImmutablePureComponent {
setTimeout(() => this.props.fetchTrends(), 5000); setTimeout(() => this.props.fetchTrends(), 5000);
} }
handleRefreshTrends = () => {
this.props.fetchTrends();
}
render () { render () {
const { intl, myAccount, multiColumn, unreadFollowRequests, trends } = this.props; const { intl, myAccount, multiColumn, unreadFollowRequests, trends } = this.props;
@ -138,7 +142,7 @@ export default class GettingStarted extends ImmutablePureComponent {
<FormattedMessage id='trends.header' defaultMessage='Trending now' /> <FormattedMessage id='trends.header' defaultMessage='Trending now' />
</button> </button>
<div className='column-header__buttons'> <div className='column-header__buttons'>
<button className='column-header__button' title={intl.formatMessage(messages.refresh_trends)} aria-label={intl.formatMessage(messages.refresh_trends)}><i className='fa fa-refresh' /></button>
<button onClick={this.handleRefreshTrends} className='column-header__button' title={intl.formatMessage(messages.refresh_trends)} aria-label={intl.formatMessage(messages.refresh_trends)}><i className='fa fa-refresh' /></button>
</div> </div>
</h1> </h1>
</div> </div>

Loading…
Cancel
Save