Fix WorkingIndicator remounting on every stream update on native

Passing an arrow function to FlatList's ListHeaderComponent caused React
to treat each re-render as a new component type, unmounting and
remounting the entire header (including the bouncing dots animation).
Pass the element directly instead so React can reconcile properly.
This commit is contained in:
Mohamed Boudra
2026-04-07 18:56:47 +07:00
parent 82466aaa9f
commit cbc2ce06e9
@@ -313,7 +313,7 @@ function NativeStreamViewport(props: StreamRenderInput & { strategy: StreamStrat
keyExtractor={(item) => item.id}
testID="agent-chat-scroll"
nativeID="agent-chat-scroll-native-virtualized"
ListHeaderComponent={liveHeaderContent ? () => liveHeaderContent : undefined}
ListHeaderComponent={liveHeaderContent ?? undefined}
contentContainerStyle={baseListContentContainerStyle}
style={listStyle}
onLayout={handleListLayout}