Repository navigation
Reapply "Merge pull request #81869 from software-mansion-labs/@zfurtak/migrate-NewChatPage" #84887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2160e65
958f304
8a33611
226877f
1247d40
d2a7863
71eea66
0a70657
a27e488
acf082f
07bf0e3
7cbdbec
f22a391
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| diff --git a/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js b/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js | ||
| index 8b75322..dd2d3bc 100644 | ||
| --- a/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js | ||
| +++ b/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ChecklistThis PR introduced the bug in #104502 (Sentry APP-MHA). FlashList patch 002 skips layout when a list first measures 0×0, so FlashList never creates its layoutManager. The patch didn't guard FlashList's own onScroll → recordInteraction() path, so a native scroll before the first layout throws "LayoutManager is not initialized, window size is unavailable". Already fixed in #104826. |
||
| @@ -74,6 +74,10 @@ const RecyclerViewComponent = (props, ref) => { | ||
| if (internalViewRef.current && firstChildViewRef.current) { | ||
| // Measure the outer container size and inner container layout | ||
| const outerViewSize = measureParentSize(internalViewRef.current); | ||
| + if (outerViewSize.width === 0 && outerViewSize.height === 0) { | ||
| + containerViewSizeRef.current = outerViewSize; | ||
| + return; | ||
| + } | ||
| const firstChildViewLayout = measureFirstChildLayout(firstChildViewRef.current, internalViewRef.current); | ||
| containerViewSizeRef.current = outerViewSize; | ||
| // firstChildViewLayout is already relative to the outer container, | ||
| @@ -103,6 +107,10 @@ const RecyclerViewComponent = (props, ref) => { | ||
| if (pendingChildIds.size > 0) { | ||
| return; | ||
| } | ||
| + if (((_a = containerViewSizeRef.current) === null || _a === void 0 ? void 0 : _a.width) === 0 && | ||
| + ((_b = containerViewSizeRef.current) === null || _b === void 0 ? void 0 : _b.height) === 0) { | ||
| + return; | ||
| + } | ||
| const layoutInfo = Array.from(refHolder, ([index, viewHolderRef]) => { | ||
| const layout = measureItemLayout(viewHolderRef.current, recyclerViewManager.tryGetLayout(index)); | ||
| // comapre height with stored layout | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey 👋
Coming from #90756, this has caused an issue with the app crashing intermittently
According to #91388 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eVoloshchak Hi 👋
There's already a merged PR that resolves this issue. The same one you linked to.