APP-2687: Fix threaded view replies breaking after rotating the lightbox (#11638)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -174,10 +174,17 @@ const ThreadItemTreePostInnerWrapper = memo(
|
|||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
|
/*
|
||||||
|
* Do not give this wrapper (or the column inside it) `flex: 1`. In a
|
||||||
|
* column, `flex: 1` means `flexBasis: 0`, so Yoga sizes the wrapper from
|
||||||
|
* its parent's measured height instead of its own content. When the
|
||||||
|
* lightbox rotates the device and back, that parent height can come from
|
||||||
|
* a stale measurement, leaving the reply text and controls laid out at the
|
||||||
|
* wrong size inside a correctly sized cell (APP-2687).
|
||||||
|
*/
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.flex_1, // TODO check on ios
|
|
||||||
{
|
{
|
||||||
paddingHorizontal: OUTER_SPACE,
|
paddingHorizontal: OUTER_SPACE,
|
||||||
paddingTop: OUTER_SPACE / 2,
|
paddingTop: OUTER_SPACE / 2,
|
||||||
@@ -331,7 +338,7 @@ const ThreadItemTreePostInner = memo(function ThreadItemTreePostInner({
|
|||||||
profile={post.author}
|
profile={post.author}
|
||||||
interpretFilterAsBlur>
|
interpretFilterAsBlur>
|
||||||
<ThreadItemTreePostInnerWrapper item={item}>
|
<ThreadItemTreePostInnerWrapper item={item}>
|
||||||
<View style={[a.flex_1]}>
|
<View>
|
||||||
<PostMeta
|
<PostMeta
|
||||||
author={post.author}
|
author={post.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
|
|||||||
Reference in New Issue
Block a user