[Glitch] Fix media gallery items having incorrect borders when hidden

Port 3b4312476f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2871/head
Claire 2024-10-04 16:55:44 +02:00
parent 4a859140ec
commit dc7a42551f
1 changed files with 2 additions and 2 deletions

View File

@ -356,14 +356,14 @@ class MediaGallery extends PureComponent {
return ( return (
<div className={computedClass} style={style} ref={this.handleRef}> <div className={computedClass} style={style} ref={this.handleRef}>
{children}
{(!visible || uncached) && ( {(!visible || uncached) && (
<div className={classNames('spoiler-button', { 'spoiler-button--click-thru': uncached })}> <div className={classNames('spoiler-button', { 'spoiler-button--click-thru': uncached })}>
{spoilerButton} {spoilerButton}
</div> </div>
)} )}
{children}
{(visible && !uncached) && ( {(visible && !uncached) && (
<div className='media-gallery__actions'> <div className='media-gallery__actions'>
<button className='media-gallery__actions__pill' onClick={this.handleOpen}><FormattedMessage id='media_gallery.hide' defaultMessage='Hide' /></button> <button className='media-gallery__actions__pill' onClick={this.handleOpen}><FormattedMessage id='media_gallery.hide' defaultMessage='Hide' /></button>