Skip to content

Commit b4ea8c6

Browse files
Merge upstream develop
2 parents 7f580ac + 0a340a3 commit b4ea8c6

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

apps/polycentric/src/common/components/List.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ function WebFeedViewer<T>({
122122
ListFooterComponent,
123123
ListEmptyComponent,
124124
onEndReached,
125+
onLoad,
125126
contentContainerStyle,
126127
stickyHeaderIndices,
127128
listRef,
@@ -141,6 +142,14 @@ function WebFeedViewer<T>({
141142
const items = (data as readonly T[] | null | undefined) ?? [];
142143
const [visibleCount, setVisibleCount] = useState(WEB_INITIAL_VISIBLE);
143144

145+
// Keep parity with native `FlashList` by calling `onLoad`.
146+
const hasFiredOnLoad = useRef(false);
147+
useEffect(() => {
148+
if (hasFiredOnLoad.current) return;
149+
hasFiredOnLoad.current = true;
150+
onLoad?.({ elapsedTimeInMs: 0 });
151+
}, [onLoad]);
152+
144153
// Reset window when the underlying list shrinks (refresh, identity
145154
// switch, etc.) so we don't keep stale slicing offsets.
146155
useEffect(() => {

renovate.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": ["config:recommended"],
4+
"minimumReleaseAge": "3 days",
45
"packageRules": [
56
{
67
"groupName": "Expo Packages",

0 commit comments

Comments
 (0)