@@ -1143,27 +1143,14 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
11431143 }
11441144 }
11451145
1146- const ListFooterComponent = useCallback ( ( ) => < FooterComponent /> , [ FooterComponent ] ) ;
1147-
1148- const ListHeaderComponent = useCallback ( ( ) => < HeaderComponent /> , [ HeaderComponent ] ) ;
1149-
1150- const ItemSeparatorComponent = additionalFlatListProps ?. ItemSeparatorComponent ;
1151- const WrappedItemSeparatorComponent = useCallback ( ( ) => {
1152- return ItemSeparatorComponent ? < ItemSeparatorComponent /> : null ;
1153- } , [ ItemSeparatorComponent ] ) ;
1154-
11551146 // We need to omit the style related props from the additionalFlatListProps and add them directly instead of spreading
11561147 let additionalFlatListPropsExcludingStyle :
1157- | Omit <
1158- NonNullable < typeof additionalFlatListProps > ,
1159- 'style' | 'contentContainerStyle' | 'ItemSeparatorComponent'
1160- >
1148+ | Omit < NonNullable < typeof additionalFlatListProps > , 'style' | 'contentContainerStyle' >
11611149 | undefined ;
11621150
11631151 if ( additionalFlatListProps ) {
11641152 // eslint-disable-next-line @typescript-eslint/no-unused-vars
1165- const { contentContainerStyle, ItemSeparatorComponent, style, ...rest } =
1166- additionalFlatListProps ;
1153+ const { contentContainerStyle, style, ...rest } = additionalFlatListProps ;
11671154 additionalFlatListPropsExcludingStyle = rest ;
11681155 }
11691156
@@ -1210,11 +1197,10 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
12101197 data = { processedMessageList }
12111198 extraData = { disabled }
12121199 inverted = { inverted }
1213- ItemSeparatorComponent = { WrappedItemSeparatorComponent }
12141200 keyboardShouldPersistTaps = 'handled'
12151201 keyExtractor = { keyExtractor }
1216- ListFooterComponent = { ListFooterComponent }
1217- ListHeaderComponent = { ListHeaderComponent }
1202+ ListFooterComponent = { FooterComponent }
1203+ ListHeaderComponent = { HeaderComponent }
12181204 /**
12191205 If autoscrollToTopThreshold is 10, we scroll to recent only if before the update, the list was already at the
12201206 bottom (10 offset or below).
0 commit comments