about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components/status_action_bar.js
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2020-10-30 09:55:47 -0500
committerStarfall <us@starfall.systems>2020-10-30 09:55:47 -0500
commit259470ec37dfc5c3d34ed5456adcd3ab1a622a18 (patch)
tree0ed8e47864234419df1133ed7cbac481ea8e12dc /app/javascript/flavours/glitch/components/status_action_bar.js
parentab2148ef84c2880465599bd8c80e15378cf0a517 (diff)
parent5a41704f8926d9594c66028ca30dc1fc0f98da3d (diff)
Merge branch 'glitch' into main
Diffstat (limited to 'app/javascript/flavours/glitch/components/status_action_bar.js')
-rw-r--r--app/javascript/flavours/glitch/components/status_action_bar.js22
1 files changed, 8 insertions, 14 deletions
diff --git a/app/javascript/flavours/glitch/components/status_action_bar.js b/app/javascript/flavours/glitch/components/status_action_bar.js
index cfb03c21b..2ccb02c62 100644
--- a/app/javascript/flavours/glitch/components/status_action_bar.js
+++ b/app/javascript/flavours/glitch/components/status_action_bar.js
@@ -40,16 +40,6 @@ const messages = defineMessages({
   hide: { id: 'status.hide', defaultMessage: 'Hide toot' },
 });
 
-const obfuscatedCount = count => {
-  if (count < 0) {
-    return 0;
-  } else if (count <= 1) {
-    return count;
-  } else {
-    return '1+';
-  }
-};
-
 export default @injectIntl
 class StatusActionBar extends ImmutablePureComponent {
 
@@ -284,10 +274,14 @@ class StatusActionBar extends ImmutablePureComponent {
     );
     if (showReplyCount) {
       replyButton = (
-        <div className='status__action-bar__counter'>
-          {replyButton}
-          <span className='status__action-bar__counter__label' >{obfuscatedCount(status.get('replies_count'))}</span>
-        </div>
+        <IconButton
+          className='status__action-bar-button'
+          title={replyTitle}
+          icon={replyIcon}
+          onClick={this.handleReplyClick}
+          counter={status.get('replies_count')}
+          obfuscateCount
+        />
       );
     }