]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Change hashtag component in web UI to show numbers for 2 last days
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 3 Sep 2019 04:35:44 +0000 (06:35 +0200)
committerThibaut Girka <thib@sitedethib.com>
Thu, 5 Sep 2019 12:02:54 +0000 (14:02 +0200)
Port d19d86fe2b26fb00577d600234c32d726fb199a4 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/components/hashtag.js

index d75edd9947d264cb2edef49b4a5168bb4d963fda..426f7ecb059a3fe7e6560f0d94d5197807800be1 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'>