Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
7d4be68
feat: migrate report actions to chronological LegendList
chrispader Sep 9, 2026
2a3323a
chore: merge main into LegendList report actions
chrispader Sep 9, 2026
d815c1a
chore: merge LegendList foundation updates
chrispader Sep 10, 2026
ba852b2
fix: address LegendList report action review
chrispader Sep 10, 2026
15312bb
chore: merge main into LegendList report actions
chrispader Sep 10, 2026
0a811f9
chore: merge main into LegendList report actions
chrispader Sep 10, 2026
750e92d
chore: merge main into LegendList report actions
chrispader Sep 10, 2026
332a7b3
fix: stabilize LegendList initial loading
chrispader Sep 10, 2026
e385011
chore: merge main into LegendList report actions
chrispader Sep 10, 2026
9117baa
chore: merge main into LegendList report actions
chrispader Sep 10, 2026
e5c4ec3
chore: merge main into LegendList report actions
chrispader Sep 10, 2026
3a782f9
test: model content growth in pagination test
chrispader Sep 10, 2026
fa5194f
fix: stabilize report actions loading behavior
chrispader Sep 10, 2026
52df1e9
refactor: remove compiled report memoization
chrispader Sep 11, 2026
c80ea5a
fix: allow report action menus to overflow list rows
chrispader Sep 14, 2026
5cb81be
chore: merge main into LegendList report actions
chrispader Sep 16, 2026
c873dca
chore: merge main into LegendList report actions
chrispader Sep 16, 2026
f91ebe0
chore: merge main into LegendList report actions
chrispader Sep 17, 2026
255f4d3
chore: merge main into LegendList report actions
chrispader Sep 17, 2026
62a7c0d
fix: supply report name in modified expense tests
chrispader Sep 17, 2026
0964d53
Merge branch 'main' into @chrispader/feat/legend-list-report-actions
chrispader Sep 17, 2026
09057d5
fix: address report actions list review feedback
chrispader Sep 18, 2026
61dc6ad
chore: merge main into report actions branch
chrispader Sep 18, 2026
ffa18ae
docs: explain report action recycling state
chrispader Sep 18, 2026
53f3b9f
Merge branch 'main' into @chrispader/feat/legend-list-report-actions
chrispader Sep 18, 2026
f12b575
fix: remove duplicate report list spacing
chrispader Sep 22, 2026
34b345d
fix: synchronize sent comment scrolling
chrispader Sep 22, 2026
da3b443
fix: preserve hydrated report list state
chrispader Sep 22, 2026
55cb72a
fix: refresh recycled unread marker rows
chrispader Sep 22, 2026
a5670fa
chore: merge main into report actions branch
chrispader Sep 22, 2026
8188df1
fix: keep report actions live across incomplete loads
chrispader Sep 24, 2026
9bd382a
fix: preserve local action scrolling without realtime echo jumps
chrispader Sep 24, 2026
f0b046a
fix: key recycled media state by action and image
chrispader Sep 24, 2026
a8fc4fa
fix: keep highlighted final action in view
chrispader Sep 24, 2026
6e7f045
test: verify unread and read thresholds from saved offset
chrispader Sep 24, 2026
ca78b55
refactor: share web report scroll-to-end implementation
chrispader Sep 24, 2026
59a5397
docs: note Android visible-position patch scope
chrispader Sep 24, 2026
d2f2cc8
fix: scroll after edited action layout settles
chrispader Sep 24, 2026
08e1f69
test: type captured list load callback
chrispader Sep 24, 2026
5c7ffc8
chore: merge main into LegendList report actions
chrispader Sep 24, 2026
84b0f19
fix: preserve Concierge tail when revealing history
chrispader Sep 24, 2026
a1e0d25
test: remove nonvirtualized report list benchmark
chrispader Sep 24, 2026
e37edb4
test: mock edited-action draft clearing
chrispader Sep 24, 2026
b43b59e
Merge branch 'main' into @chrispader/feat/legend-list-report-actions
chrispader Sep 24, 2026
e904b99
test: wait for edited action scroll frame
chrispader Sep 24, 2026
40f7719
chore: update LegendList to 3.4.0
chrispader Sep 24, 2026
a68ee3c
fix: cover warm report actions during initial layout
chrispader Sep 24, 2026
e117ffc
fix: render Concierge notification banner before chat scrolls to end
chrispader Sep 25, 2026
4adbdaa
fix: keep latest chat action visible after list measurement
chrispader Sep 25, 2026
c92613d
fix: preserve Concierge scroll position when showing history
chrispader Sep 25, 2026
7096033
fix: preserve unread message alignment at the latest action
chrispader Sep 29, 2026
c0751dd
fix: cancel report end corrections when the reader scrolls
chrispader Sep 29, 2026
0cb9d7b
fix: keep report scroll events flowing on web
chrispader Sep 29, 2026
0f53485
fix: keep chat skeleton visible until initial scrolling settles
chrispader Sep 29, 2026
b611f38
fix: resume end following after scrolling past a linked message
chrispader Sep 29, 2026
779eaac
fix: preserve chat content when clearing linked messages
chrispader Oct 1, 2026
5dab08a
chore: merge main into LegendList report actions
chrispader Oct 7, 2026
519cb5b
fix: prevent Android LegendList viewport flashes
chrispader Oct 8, 2026
8229bce
fix: keep linked messages visible after navigation and layout changes
chrispader Oct 8, 2026
ed4e31a
fix: emit web scroll events for chronological lists
chrispader Oct 8, 2026
d25f5b6
fix: preserve linked-message position through late layout
chrispader Oct 9, 2026
e83aec2
chore: merge main into LegendList report actions
chrispader Oct 9, 2026
b6c6df2
fix: preserve LegendList web scroll completion
chrispader Oct 13, 2026
40a2338
fix: resolve the current composer after focus delays
chrispader Oct 13, 2026
49ab56d
fix: avoid duplicate Android linked-message adjustments
chrispader Oct 13, 2026
e1bbfda
chore: merge main and resolve report scrolling conflicts
chrispader Oct 19, 2026
e8974de
chore: merge main into LegendList report actions
chrispader Oct 19, 2026
1de8343
fix: keyboard focus
chrispader Oct 19, 2026
bd9ce7c
fix: restore Android composer blur on keyboard dismissal
chrispader Oct 20, 2026
e60414a
Merge branch 'main' into @chrispader/fix/legend-list-reported-issues
chrispader Oct 21, 2026
1c04141
fix: fill the available height in report action lists
chrispader Oct 21, 2026
c12c90c
fix: keep the reader's position when returning to a linked chat
chrispader Oct 21, 2026
89ef8b2
fix: keep unread chats at the newest message while older rows load
chrispader Oct 21, 2026
eb148d3
fix: stop Android chats from flashing older messages at the end
chrispader Oct 21, 2026
c71756d
ci: retrigger unit tests
chrispader Oct 21, 2026
9b1bf78
refactor: consolidate report scroll-to-bottom commands
chrispader Oct 22, 2026
311f777
refactor: share linked-message positioning cleanup
chrispader Oct 22, 2026
5c905a6
fix: preserve shared-list scroll event behavior
chrispader Oct 22, 2026
e3b9d15
docs: clarify edit-message scroll scheduling
chrispader Oct 22, 2026
c8de6b3
fix: preserve LegendList native scroll event cadence
chrispader Oct 22, 2026
e466ab7
fix: retain the 250-pixel incoming-message follow range
chrispader Oct 22, 2026
4b8a445
fix: end warm report timing when covered content is visible
chrispader Oct 22, 2026
49eafc2
fix: complete edit-message scrolling after list layout
chrispader Oct 22, 2026
8dc16d8
docs: link upstream LegendList and Android anchoring fixes
chrispader Oct 22, 2026
5c00ae5
chore: merge main into the LegendList migration
chrispader Oct 23, 2026
e0b5420
ci: retrigger Reassure performance tests
chrispader Oct 24, 2026
df38ea5
test: bound the LegendList row-write benchmark page
chrispader Oct 25, 2026
2eed882
chore: combine LegendList preparation branches
chrispader Oct 26, 2026
2891fd8
refactor: separate LegendList migration from its preparation PRs
chrispader Oct 26, 2026
c5e8046
chore: sync composer preparation type cleanup
chrispader Oct 26, 2026
8e20b9c
chore: sync preparation type cleanup into migration
chrispader Oct 26, 2026
983add0
chore(deps): update LegendList to 3.7.0
chrispader Oct 26, 2026
c49149f
chore: merge main into the LegendList migration
chrispader Oct 27, 2026
918a45f
docs: record upstream MVCP fix and expected RN release
chrispader Oct 28, 2026
a163c7a
docs: clarify removal of upstreamed Android MVCP patch
chrispader Oct 28, 2026
ca55729
chore: merge main into chronological LegendList migration
chrispader Oct 28, 2026
c04beb2
chore: merge main into chronological LegendList migration
chrispader Oct 29, 2026
1798cee
refactor: clarify newest-action scroll request names
chrispader Oct 29, 2026
fde190a
test: use chronological indexes in badge-following fixture
chrispader Oct 29, 2026
ddfe800
fix: reverse report actions without ES2023 array methods
chrispader Oct 29, 2026
5ecac4f
docs: explain linked-message positioning effects
chrispader Oct 29, 2026
c2f3067
chore: merge main into chronological LegendList migration
chrispader Oct 29, 2026
2ae796c
refactor: split report actions list into focused modules
chrispader Oct 29, 2026
fa611a4
chore: merge main into chronological LegendList migration
chrispader Oct 29, 2026
bf6075f
test: cover unread tracking across focus and marker changes
chrispader Oct 29, 2026
6f5391a
fix: keep offline reports covered until list readiness
chrispader Oct 30, 2026
0750137
test: document chronological unread tracking cases
chrispader Oct 30, 2026
70f1967
refactor: move report action row rendering into a hook
chrispader Oct 30, 2026
7b82800
refactor: keep the report actions list wrapper in its index file
chrispader Oct 30, 2026
cff4781
chore: merge main into LegendList migration
chrispader Nov 2, 2026
0d1f69d
chore(deps): use LegendList 3.7.1 upstream fixes
chrispader Nov 2, 2026
6808604
fix: restore unread positioning after clearing message links
chrispader Nov 2, 2026
fe64a2d
fix: wait for newest messages before scrolling
chrispader Nov 2, 2026
7171251
fix: keep the unread divider visible after badge jumps
chrispader Nov 2, 2026
6647e3c
fix: defer message badges until list positioning is ready
chrispader Nov 2, 2026
25b9af9
fix: keep visible messages in place when older messages load
chrispader Nov 4, 2026
2ff61e1
fix: estimate report action rows closer to their real height
chrispader Nov 4, 2026
2ca717a
fix: apply pending list anchor corrections in every position pass
chrispader Nov 4, 2026
dd1f12c
fix: keep the newest visible messages in place when rows above them r…
chrispader Nov 4, 2026
e44e2d4
fix: anchor older messages that load right after a fast scroll
chrispader Nov 4, 2026
78d6dc0
fix: keep the composer above the keyboard when a chat opens with a draft
chrispader Nov 4, 2026
1d22e14
fix: keep an unread chat at its New divider while rows below it load
chrispader Nov 4, 2026
58d907a
fix: show the skeleton until a fresh chat loads its newest page
chrispader Nov 4, 2026
7d69320
docs: link the upstream LegendList PRs for the web anchoring patches
chrispader Nov 4, 2026
9da4014
Merge remote-tracking branch 'origin/main' into @chrispader/feat/lege…
chrispader Nov 4, 2026
7b38cf6
docs: point the keyboard patch notes at its standalone PR
chrispader Nov 4, 2026
f4eabd5
fix: show the report skeleton before OpenReport is queued
chrispader Nov 5, 2026
88e699a
fix: reveal the LegendList chat only after its initial scroll adjustm…
chrispader Nov 5, 2026
7acc728
chore: move the keyboard patch to its own pull request
chrispader Nov 5, 2026
e5c7317
fix: keep a linked report preview in place while newer pages load
chrispader Nov 9, 2026
41299d1
fix: open a linked final message at the top while newer messages load
chrispader Nov 9, 2026
062f198
fix: handle development API proxy failures
chrispader Nov 9, 2026
1f4acb7
chore: upgrade LegendList to 3.7.2 and port its patches
chrispader Nov 9, 2026
815595e
fix: keep LegendList's native scroll adjustments precise
chrispader Nov 9, 2026
427cc67
feat: add chat pagination loading indicators
chrispader Nov 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions jest/setupMockLegendList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function setupMockLegendList() {
onEndReached,
onEndReachedThreshold = 0.5,
onLoad,
onReady,
onScroll,
onStartReached,
onStartReachedThreshold = 0.5,
Expand All @@ -42,12 +43,15 @@ export default function setupMockLegendList() {
ref,
) => {
const onLoadRef = ReactActual.useRef(onLoad);
const onReadyRef = ReactActual.useRef(onReady);
const listMetricsRef = ReactActual.useRef<{contentLength: number; scroll: number; scrollLength: number} | undefined>(undefined);
const reachedEdgesRef = ReactActual.useRef({end: false, start: false});
onLoadRef.current = onLoad;
onReadyRef.current = onReady;

ReactActual.useEffect(() => {
onLoadRef.current?.({elapsedTimeInMs: 0});
onReadyRef.current?.();
}, []);

ReactActual.useImperativeHandle(
Expand All @@ -62,6 +66,7 @@ export default function setupMockLegendList() {
getState: () => ({
data: data ?? [],
elementAtIndex: () => undefined,
positionByKey: () => undefined,
endBuffered: (data?.length ?? 0) - 1,
startBuffered: 0,
...listMetricsRef.current,
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"@fullstory/react-native": "^1.10.2",
"@gorhom/portal": "^1.0.14",
"@invertase/react-native-apple-authentication": "^2.5.0",
"@legendapp/list": "^3.7.0",
"@legendapp/list": "^3.7.2",
"@lottiefiles/dotlottie-react": "0.13.5",
"@onfido/react-native-sdk": "15.1.0",
"@pusher/pusher-websocket-react-native": "^1.3.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
diff --git a/node_modules/@legendapp/list/react-native.web.js b/node_modules/@legendapp/list/react-native.web.js
index 5155454..c102661 100644
--- a/node_modules/@legendapp/list/react-native.web.js
+++ b/node_modules/@legendapp/list/react-native.web.js
@@ -4843,7 +4843,8 @@ function calculateItemsInView(ctx, params = {}) {
const stickyHeaderIndicesArr = state.props.stickyHeaderIndicesArr || [];
const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet || /* @__PURE__ */ new Set();
const drawDistance = getEffectiveDrawDistance(ctx, params.drawDistanceMode);
- const { dataChanged, doMVCP, forceFullItemPositions, mvcpAdjustmentSource } = params;
+ const { dataChanged, forceFullItemPositions } = params;
+ let { doMVCP, mvcpAdjustmentSource } = params;
const bootstrapInitialScrollState = ((_a3 = state.initialScrollSession) == null ? void 0 : _a3.kind) === "bootstrap" ? state.initialScrollSession.bootstrap : void 0;
const suppressInitialScrollSideEffects = !!bootstrapInitialScrollState;
const prevNumContainers = peek$(ctx, "numContainers");
@@ -4943,6 +4944,11 @@ function calculateItemsInView(ctx, params = {}) {
}
}
}
+ if (!doMVCP && state.scheduledWork.has("mvcpRecalculate")) {
+ state.scheduledWork.cancel("mvcpRecalculate");
+ doMVCP = true;
+ mvcpAdjustmentSource = "item-size";
+ }
const checkMVCP = doMVCP && !suppressInitialScrollSideEffects ? prepareMVCP(ctx, dataChanged, mvcpAdjustmentSource) : void 0;
if (dataChanged) {
resetLayoutCachesForDataChange(state);
diff --git a/node_modules/@legendapp/list/react-native.web.mjs b/node_modules/@legendapp/list/react-native.web.mjs
index ce08abe..ff71fd6 100644
--- a/node_modules/@legendapp/list/react-native.web.mjs
+++ b/node_modules/@legendapp/list/react-native.web.mjs
@@ -4822,7 +4822,8 @@ function calculateItemsInView(ctx, params = {}) {
const stickyHeaderIndicesArr = state.props.stickyHeaderIndicesArr || [];
const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet || /* @__PURE__ */ new Set();
const drawDistance = getEffectiveDrawDistance(ctx, params.drawDistanceMode);
- const { dataChanged, doMVCP, forceFullItemPositions, mvcpAdjustmentSource } = params;
+ const { dataChanged, forceFullItemPositions } = params;
+ let { doMVCP, mvcpAdjustmentSource } = params;
const bootstrapInitialScrollState = ((_a3 = state.initialScrollSession) == null ? void 0 : _a3.kind) === "bootstrap" ? state.initialScrollSession.bootstrap : void 0;
const suppressInitialScrollSideEffects = !!bootstrapInitialScrollState;
const prevNumContainers = peek$(ctx, "numContainers");
@@ -4922,6 +4923,11 @@ function calculateItemsInView(ctx, params = {}) {
}
}
}
+ if (!doMVCP && state.scheduledWork.has("mvcpRecalculate")) {
+ state.scheduledWork.cancel("mvcpRecalculate");
+ doMVCP = true;
+ mvcpAdjustmentSource = "item-size";
+ }
const checkMVCP = doMVCP && !suppressInitialScrollSideEffects ? prepareMVCP(ctx, dataChanged, mvcpAdjustmentSource) : void 0;
if (dataChanged) {
resetLayoutCachesForDataChange(state);
diff --git a/node_modules/@legendapp/list/react.js b/node_modules/@legendapp/list/react.js
index 5155454..c102661 100644
--- a/node_modules/@legendapp/list/react.js
+++ b/node_modules/@legendapp/list/react.js
@@ -4843,7 +4843,8 @@ function calculateItemsInView(ctx, params = {}) {
const stickyHeaderIndicesArr = state.props.stickyHeaderIndicesArr || [];
const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet || /* @__PURE__ */ new Set();
const drawDistance = getEffectiveDrawDistance(ctx, params.drawDistanceMode);
- const { dataChanged, doMVCP, forceFullItemPositions, mvcpAdjustmentSource } = params;
+ const { dataChanged, forceFullItemPositions } = params;
+ let { doMVCP, mvcpAdjustmentSource } = params;
const bootstrapInitialScrollState = ((_a3 = state.initialScrollSession) == null ? void 0 : _a3.kind) === "bootstrap" ? state.initialScrollSession.bootstrap : void 0;
const suppressInitialScrollSideEffects = !!bootstrapInitialScrollState;
const prevNumContainers = peek$(ctx, "numContainers");
@@ -4943,6 +4944,11 @@ function calculateItemsInView(ctx, params = {}) {
}
}
}
+ if (!doMVCP && state.scheduledWork.has("mvcpRecalculate")) {
+ state.scheduledWork.cancel("mvcpRecalculate");
+ doMVCP = true;
+ mvcpAdjustmentSource = "item-size";
+ }
const checkMVCP = doMVCP && !suppressInitialScrollSideEffects ? prepareMVCP(ctx, dataChanged, mvcpAdjustmentSource) : void 0;
if (dataChanged) {
resetLayoutCachesForDataChange(state);
diff --git a/node_modules/@legendapp/list/react.mjs b/node_modules/@legendapp/list/react.mjs
index ce08abe..ff71fd6 100644
--- a/node_modules/@legendapp/list/react.mjs
+++ b/node_modules/@legendapp/list/react.mjs
@@ -4822,7 +4822,8 @@ function calculateItemsInView(ctx, params = {}) {
const stickyHeaderIndicesArr = state.props.stickyHeaderIndicesArr || [];
const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet || /* @__PURE__ */ new Set();
const drawDistance = getEffectiveDrawDistance(ctx, params.drawDistanceMode);
- const { dataChanged, doMVCP, forceFullItemPositions, mvcpAdjustmentSource } = params;
+ const { dataChanged, forceFullItemPositions } = params;
+ let { doMVCP, mvcpAdjustmentSource } = params;
const bootstrapInitialScrollState = ((_a3 = state.initialScrollSession) == null ? void 0 : _a3.kind) === "bootstrap" ? state.initialScrollSession.bootstrap : void 0;
const suppressInitialScrollSideEffects = !!bootstrapInitialScrollState;
const prevNumContainers = peek$(ctx, "numContainers");
@@ -4922,6 +4923,11 @@ function calculateItemsInView(ctx, params = {}) {
}
}
}
+ if (!doMVCP && state.scheduledWork.has("mvcpRecalculate")) {
+ state.scheduledWork.cancel("mvcpRecalculate");
+ doMVCP = true;
+ mvcpAdjustmentSource = "item-size";
+ }
const checkMVCP = doMVCP && !suppressInitialScrollSideEffects ? prepareMVCP(ctx, dataChanged, mvcpAdjustmentSource) : void 0;
if (dataChanged) {
resetLayoutCachesForDataChange(state);
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
diff --git a/node_modules/@legendapp/list/react-native.web.js b/node_modules/@legendapp/list/react-native.web.js
index c102661..99cac83 100644
--- a/node_modules/@legendapp/list/react-native.web.js
+++ b/node_modules/@legendapp/list/react-native.web.js
@@ -1706,6 +1706,7 @@ function prepareMVCP(ctx, dataChanged, adjustmentSource) {
const {
maintainVisibleContentPosition: { data: mvcpData, size: mvcpScroll, shouldRestorePosition }
} = props;
+ const anchorIdsInView = props.alignItemsAtEnd ? [...idsInView].reverse() : idsInView;
const now = Date.now();
const enableMVCPAnchorLock = (!!dataChanged || !!state.mvcpAnchorLock);
const scrollingTo = state.scrollingTo;
@@ -1743,11 +1744,11 @@ function prepareMVCP(ctx, dataChanged, adjustmentSource) {
} else if (scrollTarget !== void 0) {
targetId = (_c = scrollingTo == null ? void 0 : scrollingTo.key) != null ? _c : getId(state, scrollTarget);
} else if (idsInView.length > 0 && state.didContainersLayout && !dataChanged) {
- targetId = idsInView.find((id) => indexByKey.get(id) !== void 0);
+ targetId = anchorIdsInView.find((id) => indexByKey.get(id) !== void 0);
}
if (dataChanged && idsInView.length > 0 && state.didContainersLayout) {
- for (let i = 0; i < idsInView.length; i++) {
- const id = idsInView[i];
+ for (let i = 0; i < anchorIdsInView.length; i++) {
+ const id = anchorIdsInView[i];
const index = previousIndexByKey.get(id);
if (index !== void 0) {
const position = positions[index];
diff --git a/node_modules/@legendapp/list/react-native.web.mjs b/node_modules/@legendapp/list/react-native.web.mjs
index ff71fd6..a7a89dd 100644
--- a/node_modules/@legendapp/list/react-native.web.mjs
+++ b/node_modules/@legendapp/list/react-native.web.mjs
@@ -1685,6 +1685,7 @@ function prepareMVCP(ctx, dataChanged, adjustmentSource) {
const {
maintainVisibleContentPosition: { data: mvcpData, size: mvcpScroll, shouldRestorePosition }
} = props;
+ const anchorIdsInView = props.alignItemsAtEnd ? [...idsInView].reverse() : idsInView;
const now = Date.now();
const enableMVCPAnchorLock = (!!dataChanged || !!state.mvcpAnchorLock);
const scrollingTo = state.scrollingTo;
@@ -1722,11 +1723,11 @@ function prepareMVCP(ctx, dataChanged, adjustmentSource) {
} else if (scrollTarget !== void 0) {
targetId = (_c = scrollingTo == null ? void 0 : scrollingTo.key) != null ? _c : getId(state, scrollTarget);
} else if (idsInView.length > 0 && state.didContainersLayout && !dataChanged) {
- targetId = idsInView.find((id) => indexByKey.get(id) !== void 0);
+ targetId = anchorIdsInView.find((id) => indexByKey.get(id) !== void 0);
}
if (dataChanged && idsInView.length > 0 && state.didContainersLayout) {
- for (let i = 0; i < idsInView.length; i++) {
- const id = idsInView[i];
+ for (let i = 0; i < anchorIdsInView.length; i++) {
+ const id = anchorIdsInView[i];
const index = previousIndexByKey.get(id);
if (index !== void 0) {
const position = positions[index];
diff --git a/node_modules/@legendapp/list/react.js b/node_modules/@legendapp/list/react.js
index c102661..99cac83 100644
--- a/node_modules/@legendapp/list/react.js
+++ b/node_modules/@legendapp/list/react.js
@@ -1706,6 +1706,7 @@ function prepareMVCP(ctx, dataChanged, adjustmentSource) {
const {
maintainVisibleContentPosition: { data: mvcpData, size: mvcpScroll, shouldRestorePosition }
} = props;
+ const anchorIdsInView = props.alignItemsAtEnd ? [...idsInView].reverse() : idsInView;
const now = Date.now();
const enableMVCPAnchorLock = (!!dataChanged || !!state.mvcpAnchorLock);
const scrollingTo = state.scrollingTo;
@@ -1743,11 +1744,11 @@ function prepareMVCP(ctx, dataChanged, adjustmentSource) {
} else if (scrollTarget !== void 0) {
targetId = (_c = scrollingTo == null ? void 0 : scrollingTo.key) != null ? _c : getId(state, scrollTarget);
} else if (idsInView.length > 0 && state.didContainersLayout && !dataChanged) {
- targetId = idsInView.find((id) => indexByKey.get(id) !== void 0);
+ targetId = anchorIdsInView.find((id) => indexByKey.get(id) !== void 0);
}
if (dataChanged && idsInView.length > 0 && state.didContainersLayout) {
- for (let i = 0; i < idsInView.length; i++) {
- const id = idsInView[i];
+ for (let i = 0; i < anchorIdsInView.length; i++) {
+ const id = anchorIdsInView[i];
const index = previousIndexByKey.get(id);
if (index !== void 0) {
const position = positions[index];
diff --git a/node_modules/@legendapp/list/react.mjs b/node_modules/@legendapp/list/react.mjs
index ff71fd6..a7a89dd 100644
--- a/node_modules/@legendapp/list/react.mjs
+++ b/node_modules/@legendapp/list/react.mjs
@@ -1685,6 +1685,7 @@ function prepareMVCP(ctx, dataChanged, adjustmentSource) {
const {
maintainVisibleContentPosition: { data: mvcpData, size: mvcpScroll, shouldRestorePosition }
} = props;
+ const anchorIdsInView = props.alignItemsAtEnd ? [...idsInView].reverse() : idsInView;
const now = Date.now();
const enableMVCPAnchorLock = (!!dataChanged || !!state.mvcpAnchorLock);
const scrollingTo = state.scrollingTo;
@@ -1722,11 +1723,11 @@ function prepareMVCP(ctx, dataChanged, adjustmentSource) {
} else if (scrollTarget !== void 0) {
targetId = (_c = scrollingTo == null ? void 0 : scrollingTo.key) != null ? _c : getId(state, scrollTarget);
} else if (idsInView.length > 0 && state.didContainersLayout && !dataChanged) {
- targetId = idsInView.find((id) => indexByKey.get(id) !== void 0);
+ targetId = anchorIdsInView.find((id) => indexByKey.get(id) !== void 0);
}
if (dataChanged && idsInView.length > 0 && state.didContainersLayout) {
- for (let i = 0; i < idsInView.length; i++) {
- const id = idsInView[i];
+ for (let i = 0; i < anchorIdsInView.length; i++) {
+ const id = anchorIdsInView[i];
const index = previousIndexByKey.get(id);
if (index !== void 0) {
const position = positions[index];
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
diff --git a/node_modules/@legendapp/list/react-native.web.js b/node_modules/@legendapp/list/react-native.web.js
index 99cac83..30d9757 100644
--- a/node_modules/@legendapp/list/react-native.web.js
+++ b/node_modules/@legendapp/list/react-native.web.js
@@ -7880,6 +7880,9 @@ function checkResetContainers(ctx, dataProp, { didColumnsChange = false } = {})
state.scrollForNextCalculateItemsInView = void 0;
}
state.positionsAreCurrent = false;
+ if (state.props.maintainVisibleContentPosition.data) {
+ state.userScrollAnchorReset = void 0;
+ }
calculateItemsInView(ctx, { dataChanged: true, doMVCP: true });
if ((_a3 = state.pendingEndMeasurements) == null ? void 0 : _a3.size) {
const removedMeasurements = new Set(state.pendingEndMeasurements);
diff --git a/node_modules/@legendapp/list/react-native.web.mjs b/node_modules/@legendapp/list/react-native.web.mjs
index a7a89dd..f55dea9 100644
--- a/node_modules/@legendapp/list/react-native.web.mjs
+++ b/node_modules/@legendapp/list/react-native.web.mjs
@@ -7859,6 +7859,9 @@ function checkResetContainers(ctx, dataProp, { didColumnsChange = false } = {})
state.scrollForNextCalculateItemsInView = void 0;
}
state.positionsAreCurrent = false;
+ if (state.props.maintainVisibleContentPosition.data) {
+ state.userScrollAnchorReset = void 0;
+ }
calculateItemsInView(ctx, { dataChanged: true, doMVCP: true });
if ((_a3 = state.pendingEndMeasurements) == null ? void 0 : _a3.size) {
const removedMeasurements = new Set(state.pendingEndMeasurements);
diff --git a/node_modules/@legendapp/list/react.js b/node_modules/@legendapp/list/react.js
index 99cac83..30d9757 100644
--- a/node_modules/@legendapp/list/react.js
+++ b/node_modules/@legendapp/list/react.js
@@ -7880,6 +7880,9 @@ function checkResetContainers(ctx, dataProp, { didColumnsChange = false } = {})
state.scrollForNextCalculateItemsInView = void 0;
}
state.positionsAreCurrent = false;
+ if (state.props.maintainVisibleContentPosition.data) {
+ state.userScrollAnchorReset = void 0;
+ }
calculateItemsInView(ctx, { dataChanged: true, doMVCP: true });
if ((_a3 = state.pendingEndMeasurements) == null ? void 0 : _a3.size) {
const removedMeasurements = new Set(state.pendingEndMeasurements);
diff --git a/node_modules/@legendapp/list/react.mjs b/node_modules/@legendapp/list/react.mjs
index a7a89dd..f55dea9 100644
--- a/node_modules/@legendapp/list/react.mjs
+++ b/node_modules/@legendapp/list/react.mjs
@@ -7859,6 +7859,9 @@ function checkResetContainers(ctx, dataProp, { didColumnsChange = false } = {})
state.scrollForNextCalculateItemsInView = void 0;
}
state.positionsAreCurrent = false;
+ if (state.props.maintainVisibleContentPosition.data) {
+ state.userScrollAnchorReset = void 0;
+ }
calculateItemsInView(ctx, { dataChanged: true, doMVCP: true });
if ((_a3 = state.pendingEndMeasurements) == null ? void 0 : _a3.size) {
const removedMeasurements = new Set(state.pendingEndMeasurements);
Loading
Loading