do not limit to 4 medias in display of media gallery

This commit is contained in:
tykayn 2021-01-14 10:01:30 +01:00 committed by Baptiste Lemoine
parent d96d645e0f
commit 847f3862c3
1 changed files with 2 additions and 2 deletions

View File

@ -329,13 +329,13 @@ class MediaGallery extends React.PureComponent {
style.height = height;
}
const size = media.take(4).size;
const size = media.size;
const uncached = media.every(attachment => attachment.get('type') === 'unknown');
if (standalone && this.isFullSizeEligible()) {
children = <Item standalone autoplay={autoplay} onClick={this.handleClick} attachment={media.get(0)} displayWidth={width} visible={visible} />;
} else {
children = media.take(4).map((attachment, i) => <Item key={attachment.get('id')} autoplay={autoplay} onClick={this.handleClick} attachment={attachment} index={i} size={size} displayWidth={width} visible={visible || uncached} />);
children = media.map((attachment, i) => <Item key={attachment.get('id')} autoplay={autoplay} onClick={this.handleClick} attachment={attachment} index={i} size={size} displayWidth={width} visible={visible || uncached} />);
}
if (uncached) {