[Glitch] Replace onScrollToBottom with onLoadMore

Port b0664a5e6c to glitch-soc
This commit is contained in:
Thibaut Girka
2018-05-27 17:46:48 +02:00
committed by ThibG
parent a81ed7b205
commit 8b98afa781
7 changed files with 17 additions and 18 deletions

View File

@@ -67,7 +67,7 @@ export default class Notifications extends React.PureComponent {
trackScroll: true,
};
handleScrollToBottom = debounce(() => {
handleLoadMore = debounce(() => {
this.props.dispatch(scrollTopNotifications(false));
this.props.dispatch(expandNotifications());
}, 300, { leading: true });
@@ -153,7 +153,7 @@ export default class Notifications extends React.PureComponent {
isLoading={isLoading}
hasMore={hasMore}
emptyMessage={emptyMessage}
onScrollToBottom={this.handleScrollToBottom}
onLoadMore={this.handleLoadMore}
onScrollToTop={this.handleScrollToTop}
onScroll={this.handleScroll}
shouldUpdateScroll={shouldUpdateScroll}