]> cat aescling's git repositories - mastodon.git/commitdiff
Show LoadMore button on Notifications even if all items are filtered (#4077)
authorunarist <m.unarist@gmail.com>
Wed, 5 Jul 2017 12:51:53 +0000 (21:51 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 5 Jul 2017 12:51:53 +0000 (14:51 +0200)
app/javascript/mastodon/features/notifications/index.js

index ed4b3ad9822484050bdfdb2a6d6e4b9c768c3bcc..2f545fa4a326b862f20eeec526c35a66f6162880 100644 (file)
@@ -122,7 +122,7 @@ export default class Notifications extends React.PureComponent {
     let unread         = '';
     let scrollContainer = '';
 
-    if (!isLoading && notifications.size > 0 && hasMore) {
+    if (!isLoading && hasMore) {
       loadMore = <LoadMore onClick={this.handleLoadMore} />;
     }
 
@@ -132,7 +132,7 @@ export default class Notifications extends React.PureComponent {
 
     if (isLoading && this.scrollableArea) {
       scrollableArea = this.scrollableArea;
-    } else if (notifications.size > 0) {
+    } else if (notifications.size > 0 || hasMore) {
       scrollableArea = (
         <div className='scrollable' onScroll={this.handleScroll} ref={this.setRef}>
           {unread}