Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

@legendapp__list@3.7.3.patch

28 lines1.4 KB

1diff --git a/react-native.js b/react-native.js
2index 440b0ad..fd5d18d 100644
3--- a/react-native.js
4+++ b/react-native.js
5@@ -1344,7 +1344,8 @@ function checkAtBottom(ctx, allowedEdge, allowGateCreatedInCurrentCheck) {
6 return;
7 }
8 if (contentSize > 0 && queuedInitialLayout) {
9- const isContentLess = contentSize < scrollLength;
10+ // T3 patch: a top inset (e.g. a translucent header) shrinks the room content has to fit in.
11+ const isContentLess = contentSize + getContentInsetTop(ctx) < scrollLength;
12 set$(ctx, "isAtEnd", isContentLess || distanceFromEnd <= EDGE_POSITION_EPSILON);
13 set$(ctx, "isNearEnd", isContentLess || distanceFromEnd <= onEndReachedThreshold * scrollLength);
14 set$(
15diff --git a/react-native.mjs b/react-native.mjs
16index b95e1f8..e2b013a 100644
17--- a/react-native.mjs
18+++ b/react-native.mjs
19@@ -1323,7 +1323,8 @@ function checkAtBottom(ctx, allowedEdge, allowGateCreatedInCurrentCheck) {
20 return;
21 }
22 if (contentSize > 0 && queuedInitialLayout) {
23- const isContentLess = contentSize < scrollLength;
24+ // T3 patch: a top inset (e.g. a translucent header) shrinks the room content has to fit in.
25+ const isContentLess = contentSize + getContentInsetTop(ctx) < scrollLength;
26 set$(ctx, "isAtEnd", isContentLess || distanceFromEnd <= EDGE_POSITION_EPSILON);
27 set$(ctx, "isNearEnd", isContentLess || distanceFromEnd <= onEndReachedThreshold * scrollLength);
28 set$(