@@ -648,6 +648,27 @@ class Status extends ImmutablePureComponent {
648
648
media = { status . get ( 'media_attachments' ) }
649
649
/> ,
650
650
) ;
651
+ } else if ( [ 'image' , 'gifv' ] . includes ( status . getIn ( [ 'media_attachments' , 0 , 'type' ] ) ) || status . get ( 'media_attachments' ) . size > 1 ) {
652
+ media . push (
653
+ < Bundle fetchComponent = { MediaGallery } loading = { this . renderLoadingMediaGallery } >
654
+ { Component => (
655
+ < Component
656
+ media = { attachments }
657
+ lang = { language }
658
+ sensitive = { status . get ( 'sensitive' ) }
659
+ letterbox = { settings . getIn ( [ 'media' , 'letterbox' ] ) }
660
+ fullwidth = { ! rootId && settings . getIn ( [ 'media' , 'fullwidth' ] ) }
661
+ hidden = { isCollapsed || ! isExpanded }
662
+ onOpenMedia = { this . handleOpenMedia }
663
+ cacheWidth = { this . props . cacheMediaWidth }
664
+ defaultWidth = { this . props . cachedMediaWidth }
665
+ visible = { this . state . showMedia }
666
+ onToggleVisibility = { this . handleToggleMediaVisibility }
667
+ />
668
+ ) }
669
+ </ Bundle > ,
670
+ ) ;
671
+ mediaIcons . push ( 'picture-o' ) ;
651
672
} else if ( attachments . getIn ( [ 0 , 'type' ] ) === 'audio' ) {
652
673
const attachment = status . getIn ( [ 'media_attachments' , 0 ] ) ;
653
674
const description = attachment . getIn ( [ 'translation' , 'description' ] ) || attachment . get ( 'description' ) ;
@@ -703,27 +724,6 @@ class Status extends ImmutablePureComponent {
703
724
</ Bundle > ,
704
725
) ;
705
726
mediaIcons . push ( 'video-camera' ) ;
706
- } else { // Media type is 'image' or 'gifv'
707
- media . push (
708
- < Bundle fetchComponent = { MediaGallery } loading = { this . renderLoadingMediaGallery } >
709
- { Component => (
710
- < Component
711
- media = { attachments }
712
- lang = { language }
713
- sensitive = { status . get ( 'sensitive' ) }
714
- letterbox = { settings . getIn ( [ 'media' , 'letterbox' ] ) }
715
- fullwidth = { ! rootId && settings . getIn ( [ 'media' , 'fullwidth' ] ) }
716
- hidden = { isCollapsed || ! isExpanded }
717
- onOpenMedia = { this . handleOpenMedia }
718
- cacheWidth = { this . props . cacheMediaWidth }
719
- defaultWidth = { this . props . cachedMediaWidth }
720
- visible = { this . state . showMedia }
721
- onToggleVisibility = { this . handleToggleMediaVisibility }
722
- />
723
- ) }
724
- </ Bundle > ,
725
- ) ;
726
- mediaIcons . push ( 'picture-o' ) ;
727
727
}
728
728
729
729
if ( ! status . get ( 'sensitive' ) && ! ( status . get ( 'spoiler_text' ) . length > 0 ) && settings . getIn ( [ 'collapsed' , 'backgrounds' , 'preview_images' ] ) ) {
0 commit comments