]> cat aescling's git repositories - mastodon.git/commitdiff
Fix polls icon not showing in CW button in detailed statuses
authorThibaut Girka <thib@sitedethib.com>
Fri, 3 May 2019 18:25:57 +0000 (20:25 +0200)
committerThibG <thib@sitedethib.com>
Fri, 3 May 2019 19:55:50 +0000 (21:55 +0200)
app/javascript/flavours/glitch/features/status/components/detailed_status.js

index 69b646427857ae81462d692eeca0ddadf81597ff..8b35de0d49cdd59bb2d9ac40ff69969f1357218b 100644 (file)
@@ -125,6 +125,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
 
     if (status.get('poll')) {
       media = <PollContainer pollId={status.get('poll')} />;
+      mediaIcon = 'tasks';
     } else if (status.get('media_attachments').size > 0) {
       if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {
         media = <AttachmentList media={status.get('media_attachments')} />;
@@ -161,7 +162,10 @@ export default class DetailedStatus extends ImmutablePureComponent {
         );
         mediaIcon = 'picture-o';
       }
-    } else media = <Card onOpenMedia={this.props.onOpenMedia} card={status.get('card', null)} />;
+    } else {
+      media = <Card onOpenMedia={this.props.onOpenMedia} card={status.get('card', null)} />;
+      mediaIcon = 'link';
+    }
 
     if (status.get('application')) {
       applicationLink = <span> ยท <a className='detailed-status__application' href={status.getIn(['application', 'website'])} target='_blank' rel='noopener'>{status.getIn(['application', 'name'])}</a></span>;