]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Do not display empty message when the list is known to have more elements
authorThibaut Girka <thib@sitedethib.com>
Wed, 12 Dec 2018 17:04:10 +0000 (18:04 +0100)
committerThibG <thib@sitedethib.com>
Thu, 13 Dec 2018 14:00:36 +0000 (15:00 +0100)
app/javascript/flavours/glitch/components/scrollable_list.js

index 06d8ecd42fa90abed16587777c16c61681e54014..bd922462e9540aebd39815416b2f280566fa6d62 100644 (file)
@@ -164,7 +164,7 @@ export default class ScrollableList extends PureComponent {
     const { fullscreen } = this.state;
     const childrenCount = React.Children.count(children);
 
-    const loadMore     = (hasMore && childrenCount > 0 && onLoadMore) ? <LoadMore visible={!isLoading} onClick={this.handleLoadMore} /> : null;
+    const loadMore     = (hasMore && onLoadMore) ? <LoadMore visible={!isLoading} onClick={this.handleLoadMore} /> : null;
     let scrollableArea = null;
 
     if (showLoading) {
@@ -179,7 +179,7 @@ export default class ScrollableList extends PureComponent {
           </div>
         </div>
       );
-    } else if (isLoading || childrenCount > 0 || !emptyMessage) {
+    } else if (isLoading || childrenCount > 0 || hasMore || !emptyMessage) {
       scrollableArea = (
         <div className={classNames('scrollable', { fullscreen })} ref={this.setRef}>
           <div role='feed' className='item-list'>