]> cat aescling's git repositories - mastodon.git/commitdiff
Swap position of media attachments and polls
authorClaire <claire.github-309c@sitedethib.com>
Wed, 20 Apr 2022 19:29:31 +0000 (21:29 +0200)
committersingle-right-quote <11325618-aescling@users.noreply.gitlab.com>
Thu, 5 May 2022 03:55:59 +0000 (23:55 -0400)
app/javascript/flavours/glitch/components/status.js
app/javascript/flavours/glitch/features/status/components/detailed_status.js

index 02ff9ab28e1baf43eeae093e9b39eb0e05c84215..21f0e3a6f1058121f4906078552944815b3052d0 100644 (file)
@@ -581,10 +581,7 @@ class Status extends ImmutablePureComponent {
     //  backgrounds for collapsed statuses are enabled.
 
     attachments = status.get('media_attachments');
-    if (status.get('poll')) {
-      media.push(<PollContainer pollId={status.get('poll')} />);
-      mediaIcons.push('tasks');
-    }
+
     if (usingPiP) {
       media.push(<PictureInPicturePlaceholder width={this.props.cachedMediaWidth} />);
       mediaIcons.push('video-camera');
@@ -684,6 +681,11 @@ class Status extends ImmutablePureComponent {
       mediaIcons.push('link');
     }
 
+    if (status.get('poll')) {
+      media.push(<PollContainer pollId={status.get('poll')} />);
+      mediaIcons.push('tasks');
+    }
+
     //  Here we prepare extra data-* attributes for CSS selectors.
     //  Users can use those for theming, hiding avatars etc via UserStyle
     const selectorAttribs = {
index 528d2eb73762bd14544e115d5f55ce1554dd3457..f4e6c24c546611ee7f5896616f0926196e620ed7 100644 (file)
@@ -134,10 +134,6 @@ class DetailedStatus extends ImmutablePureComponent {
       outerStyle.height = `${this.state.height}px`;
     }
 
-    if (status.get('poll')) {
-      media.push(<PollContainer pollId={status.get('poll')} />);
-      mediaIcons.push('tasks');
-    }
     if (usingPiP) {
       media.push(<PictureInPicturePlaceholder />);
       mediaIcons.push('video-camera');
@@ -202,6 +198,11 @@ class DetailedStatus extends ImmutablePureComponent {
       mediaIcons.push('link');
     }
 
+    if (status.get('poll')) {
+      media.push(<PollContainer pollId={status.get('poll')} />);
+      mediaIcons.push('tasks');
+    }
+
     if (status.get('application')) {
       applicationLink = <React.Fragment> ยท <a className='detailed-status__application' href={status.getIn(['application', 'website'])} target='_blank' rel='noopener noreferrer'>{status.getIn(['application', 'name'])}</a></React.Fragment>;
     }