Browse Source

[Glitch] Fix “load more” button when no data has been fetched

closed-social-glitch-2
Thibaut Girka 6 years ago
committed by ThibG
parent
commit
1e656c3632
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/javascript/flavours/glitch/components/status_list.js
  2. +1
    -1
      app/javascript/flavours/glitch/features/account_gallery/index.js

+ 1
- 1
app/javascript/flavours/glitch/components/status_list.js View File

@ -55,7 +55,7 @@ export default class StatusList extends ImmutablePureComponent {
}
handleLoadOlder = debounce(() => {
this.props.onLoadMore(this.props.statusIds.last());
this.props.onLoadMore(this.props.statusIds.size > 0 ? this.props.statusIds.last() : undefined);
}, 300, { leading: true })
_selectChild (index) {

+ 1
- 1
app/javascript/flavours/glitch/features/account_gallery/index.js View File

@ -67,7 +67,7 @@ export default class AccountGallery extends ImmutablePureComponent {
handleScrollToBottom = () => {
if (this.props.hasMore) {
this.handleLoadMore(this.props.medias.last().getIn(['status', 'id']));
this.handleLoadMore(this.props.medias.size > 0 ? this.props.medias.last().getIn(['status', 'id']) : undefined);
}
}

Loading…
Cancel
Save