Skip to content

Commit 5825695

Browse files
shivamhwpPipyakasclaude
authored andcommitted
fix(mobile): Android shows the composer buttons and all Thread settings rows with animations removed
With Android's Remove animations on, Reanimated can drop the one frame a reduced-motion entering animation gets, so the view stays at its starting pose (opacity 0). The new-thread toolbar flip and the Thread settings row fades both hit this. Skip those entering and exiting animations when reduced motion is on so the views mount in their resting style. Closes #21744 Co-authored-by: Pipyakas <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 32ecd71 commit 5825695

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎apps/mobile/src/features/threads/ThreadSettingsSheet.tsx‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ import {
4949
type ReactNode,
5050
} from "react";
5151
import { Platform, Pressable, RefreshControl, ScrollView, TextInput, View } from "react-native";
52-
import Animated, { FadeIn, FadeOut, LinearTransition } from "react-native-reanimated";
52+
import Animated, {
53+
FadeIn,
54+
FadeOut,
55+
LinearTransition,
56+
useReducedMotion,
57+
} from "react-native-reanimated";
5358
import { useSafeAreaInsets } from "react-native-safe-area-context";
5459

5560
import { SymbolView } from "../../components/ui/AppSymbol";
@@ -938,7 +943,10 @@ function ThreadSettingsMainContent(props: {
938943
if (error) Dialog.alert("Could not refresh models", error);
939944
});
940945
};
941-
const [animationsReady, setAnimationsReady] = useState(false);
946+
const [listLoaded, setListLoaded] = useState(false);
947+
// Android can drop the first frame of a reduced-motion fade, leaving rows invisible.
948+
const reducedMotion = useReducedMotion();
949+
const animationsReady = listLoaded && !reducedMotion;
942950
const catalogItems = buildThreadSettingsCatalogItems(session);
943951
const hasActiveCatalogFilter =
944952
session.providerFilter !== null || session.searchQuery.trim().length > 0;
@@ -1064,7 +1072,7 @@ function ThreadSettingsMainContent(props: {
10641072
<RefreshControl refreshing={isRefreshingProviders} onRefresh={refreshProviders} />
10651073
) : undefined
10661074
}
1067-
onLoad={() => setAnimationsReady(true)}
1075+
onLoad={() => setListLoaded(true)}
10681076
renderItem={renderCatalogItem}
10691077
showsVerticalScrollIndicator={false}
10701078
/>

0 commit comments

Comments
 (0)