Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): keep iOS chat rows aligned after measurement #11813

Mergeddominic-r(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/11813/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 3 additions and 14 deletions.

x
0 of 1 viewed, 1 left
3 additions and 14 deletionsapps/mobile/src/features/threads/ThreadFeed.tsxModified
View file
@@ -83,7 +83,7 @@
import { flattenThemeColor } from "../../lib/mobileTheme";
import { PresentationSource } from "../../components/NativePresentation";
import { useSafeAreaInsets } from "react-native-safe-area-context";
-import Animated, { FadeIn, LinearTransition, type SharedValue } from "react-native-reanimated";
+import Animated, { FadeIn, type SharedValue } from "react-native-reanimated";
import { useUniwindTheme } from "../../lib/useUniwindTheme";
import { IOS_NAV_BAR_HEIGHT } from "../../lib/layoutMetrics";
import { useFontFamily } from "../../lib/useFontFamily";
@@ -216,8 +216,6 @@
// Fixed heights mirror renderFeedEntry's classNames and are only used while
// text fits at the current font settings. Larger accessibility text is measured.
const TURN_FOLD_HEIGHT = 42; // min-h-11 (38.5) + mb-1 (3.5), with the mobile 14px rem
-const THREAD_FEED_LAYOUT_TRANSITION = LinearTransition.duration(THREAD_DISCLOSURE_TRANSITION_MS);
-const THREAD_FEED_IMMEDIATE_TRANSITION = LinearTransition.duration(0);
// Tailwind spacing on the mobile 14px rem: px-3.5 on the user bubble, px-1 on
// assistant rows. Images size their frame from these before their own layout.
const USER_BUBBLE_HORIZONTAL_PADDING = 3.5 * 3.5;
@@ -2825,17 +2823,8 @@
entry.type === "message" ? `message:${entry.message.role}` : entry.type
getFixedItemSize={getFixedItemSize}
- // Android can retain stale native row positions when layout transitions
- // race the measurements arriving during sync, even with duration 0.
- // Keep its rows on LegendList's non-animated positioning path. On iOS,
- // keep a transition installed between disclosures so containers don't remount.
- itemLayoutAnimation={
- Platform.OS === "android"