]> cat aescling's git repositories - mastodon.git/commitdiff
Change hashtag component in web UI to show numbers for 2 last days (#11742)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 3 Sep 2019 04:35:44 +0000 (06:35 +0200)
committerGitHub <noreply@github.com>
Tue, 3 Sep 2019 04:35:44 +0000 (06:35 +0200)
To deal with the midnight problem

app/javascript/mastodon/components/hashtag.js

index f091d7893e6631e0f6c12983f8a139854d78051a..2456eac9e685a0707a83f68029a5dc19f3ef5594 100644 (file)
@@ -12,11 +12,11 @@ const Hashtag = ({ hashtag }) => (
         #<span>{hashtag.get('name')}</span>
       </Permalink>
 
-      <FormattedMessage id='trends.count_by_accounts' defaultMessage='{count} {rawCount, plural, one {person} other {people}} talking' values={{ rawCount: hashtag.getIn(['history', 0, 'accounts']), count: <strong>{shortNumberFormat(hashtag.getIn(['history', 0, 'accounts']))}</strong> }} />
+      <FormattedMessage id='trends.count_by_accounts' defaultMessage='{count} {rawCount, plural, one {person} other {people}} talking' values={{ rawCount: hashtag.getIn(['history', 0, 'accounts']), count: <strong>{shortNumberFormat(hashtag.getIn(['history', 0, 'accounts']) + hashtag.getIn(['history', 1, 'accounts']))}</strong> }} />
     </div>
 
     <div className='trends__item__current'>
-      {shortNumberFormat(hashtag.getIn(['history', 0, 'uses']))}
+      {shortNumberFormat(hashtag.getIn(['history', 0, 'uses']) + hashtag.getIn(['history', 1, 'uses']))}
     </div>
 
     <div className='trends__item__sparkline'>