Fix Notifications pagination

revert-5af0e40a
Alex Gleason 2022-04-22 13:05:40 -05:00
rodzic 006e253e23
commit da17214a0b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -156,16 +156,18 @@ class Notifications extends React.PureComponent {
? (<FilterBarContainer />)
: null;
const showLoading = isLoading && !notifications || notifications.isEmpty();
const scrollContainer = (
<PullToRefresh onRefresh={this.handleRefresh}>
<Virtuoso
useWindowScroll
data={isLoading ? Array(20).fill() : notifications.toArray()}
data={showLoading ? Array(20).fill() : notifications.toArray()}
startReached={this.handleScrollToTop}
endReached={this.handleLoadOlder}
isScrolling={isScrolling => isScrolling && this.handleScroll()}
itemContent={(_index, notification) => (
isLoading ? (
showLoading ? (
<PlaceholderNotification />
) : (
<NotificationContainer