@@ -1143,23 +1143,14 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
11431143 }
11441144 }
11451145
1146- const ItemSeparatorComponent = additionalFlatListProps ?. ItemSeparatorComponent ;
1147- const WrappedItemSeparatorComponent = useCallback ( ( ) => {
1148- return ItemSeparatorComponent ? < ItemSeparatorComponent /> : null ;
1149- } , [ ItemSeparatorComponent ] ) ;
1150-
11511146 // We need to omit the style related props from the additionalFlatListProps and add them directly instead of spreading
11521147 let additionalFlatListPropsExcludingStyle :
1153- | Omit <
1154- NonNullable < typeof additionalFlatListProps > ,
1155- 'style' | 'contentContainerStyle' | 'ItemSeparatorComponent'
1156- >
1148+ | Omit < NonNullable < typeof additionalFlatListProps > , 'style' | 'contentContainerStyle' >
11571149 | undefined ;
11581150
11591151 if ( additionalFlatListProps ) {
11601152 // eslint-disable-next-line @typescript-eslint/no-unused-vars
1161- const { contentContainerStyle, ItemSeparatorComponent, style, ...rest } =
1162- additionalFlatListProps ;
1153+ const { contentContainerStyle, style, ...rest } = additionalFlatListProps ;
11631154 additionalFlatListPropsExcludingStyle = rest ;
11641155 }
11651156
@@ -1206,7 +1197,6 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
12061197 data = { processedMessageList }
12071198 extraData = { disabled }
12081199 inverted = { inverted }
1209- ItemSeparatorComponent = { WrappedItemSeparatorComponent }
12101200 keyboardShouldPersistTaps = 'handled'
12111201 keyExtractor = { keyExtractor }
12121202 ListFooterComponent = { FooterComponent }
0 commit comments