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:
Samuel Newman
2026-09-02 21:31:55 +03:00
committed by GitHub
parent e08bcd0228
commit d6e5961adf
@@ -174,10 +174,17 @@ const ThreadItemTreePostInnerWrapper = memo(
children: React.ReactNode
}) {
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 (
<View
style={[
a.flex_1, // TODO check on ios
{
paddingHorizontal: OUTER_SPACE,
paddingTop: OUTER_SPACE / 2,
@@ -331,7 +338,7 @@ const ThreadItemTreePostInner = memo(function ThreadItemTreePostInner({
profile={post.author}
interpretFilterAsBlur>
<ThreadItemTreePostInnerWrapper item={item}>
<View style={[a.flex_1]}>
<View>
<PostMeta
author={post.author}
moderation={moderation}