Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix `onEndReached` not firing sometimes on web (#4728)

* handle off screen visibility observer.

* Revert "handle off screen visibility observer."

This reverts commit e499ea0ed66b31964f79261b41f58a288b0cdb6f.

* key ftw

* Remove special case

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>

authored by

Hailey
Dan Abramov
and committed by
GitHub
ca738696 d837f964

+2 -10
+1 -10
src/view/com/notifications/Feed.tsx
··· 25 25 import {CenteredView} from '#/view/com/util/Views' 26 26 import {FeedItem} from './FeedItem' 27 27 import hairlineWidth = StyleSheet.hairlineWidth 28 - import {isWeb} from '#/platform/detection' 29 28 30 29 const EMPTY_FEED_ITEM = {_reactKey: '__empty__'} 31 30 const LOAD_MORE_ERROR_ITEM = {_reactKey: '__load_more_error__'} ··· 183 182 refreshing={isPTRing} 184 183 onRefresh={onRefresh} 185 184 onEndReached={onEndReached} 186 - onEndReachedThreshold={ 187 - /* 188 - NOTE: 189 - web's intersection observer struggles with the 2x threshold 190 - and leads to missed pagination, so we keep it <1 191 - -prf 192 - */ 193 - isWeb ? 0.6 : 2 194 - } 185 + onEndReachedThreshold={2} 195 186 onScrolledDownChange={onScrolledDownChange} 196 187 contentContainerStyle={s.contentContainer} 197 188 // @ts-ignore our .web version only -prf
+1
src/view/com/util/List.web.tsx
··· 365 365 root={containWeb ? nativeRef : null} 366 366 onVisibleChange={onTailVisibilityChange} 367 367 bottomMargin={(onEndReachedThreshold ?? 0) * 100 + '%'} 368 + key={data?.length} 368 369 /> 369 370 )} 370 371 {footerComponent}