This commit is contained in:
mgabdev
2020-04-28 01:33:58 -04:00
parent 763694b5ab
commit c3d0d8bde2
87 changed files with 1392 additions and 826 deletions

View File

@@ -53,6 +53,7 @@ class Notifications extends ImmutablePureComponent {
}
handleLoadGap = (maxId) => {
// maxId={index > 0 ? notifications.getIn([index - 1, 'id']) : null}
this.props.dispatch(expandNotifications({ maxId }))
}
@@ -122,13 +123,7 @@ class Notifications extends ImmutablePureComponent {
scrollableContent = this.scrollableContent
} else if (notifications.size > 0 || hasMore) {
scrollableContent = notifications.map((item, index) => item === null ? (
<LoadMore
gap
key={'gap:' + notifications.getIn([index + 1, 'id'])}
disabled={isLoading}
maxId={index > 0 ? notifications.getIn([index - 1, 'id']) : null}
onClick={this.handleLoadGap}
/>
<LoadMore disabled={isLoading} onClick={this.handleLoadGap} />
) : (
<NotificationContainer
key={`notification-${index}`}