File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
package/src/components/MessageList Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -463,11 +463,6 @@ const MessageFlashListWithContext = (props: MessageFlashListPropsWithContext) =>
463463 clearTimeout ( scrollToDebounceTimeoutRef . current ) ;
464464 await loadChannelAroundMessage ( { messageId, setTargetedMessage } ) ;
465465 } else {
466- flashListRef . current ?. scrollToIndex ( {
467- animated : true ,
468- index : indexOfParentInMessageList ,
469- viewPosition : 0.5 ,
470- } ) ;
471466 setTargetedMessage ( messageId ) ;
472467 }
473468 } catch ( e ) {
@@ -1094,11 +1089,6 @@ const MessageFlashListWithContext = (props: MessageFlashListPropsWithContext) =>
10941089 [ contentContainer ] ,
10951090 ) ;
10961091
1097- const getItemType = useStableCallback ( ( item : LocalMessage ) => {
1098- const type = getItemTypeInternal ( item ) ;
1099- return client . userID === item . user ?. id ? `own-${ type } ` : type ;
1100- } ) ;
1101-
11021092 const currentListHeightRef = useRef < number | undefined > ( undefined ) ;
11031093
11041094 const onLayout = useStableCallback ( ( e : LayoutChangeEvent ) => {
@@ -1144,7 +1134,7 @@ const MessageFlashListWithContext = (props: MessageFlashListPropsWithContext) =>
11441134 contentContainerStyle = { flatListContentContainerStyle }
11451135 data = { processedMessageList }
11461136 drawDistance = { 800 }
1147- getItemType = { getItemType }
1137+ getItemType = { getItemTypeInternal }
11481138 initialScrollIndex = {
11491139 indexToScrollToRef . current === - 1 ? undefined : indexToScrollToRef . current
11501140 }
You can’t perform that action at this time.
0 commit comments