11import React , { forwardRef , useImperativeHandle } from 'react' ;
22
3- import ActivityIndicator from '../../../containers/ActivityIndicator' ;
43import { useDebounce } from '../../../lib/methods/helpers' ;
54import { EmptyRoom , List } from './components' ;
65import { IListContainerProps , IListContainerRef , IListProps } from './definitions' ;
76import { useMessages , useScroll } from './hooks' ;
87
98const ListContainer = forwardRef < IListContainerRef , IListContainerProps > (
10- ( { rid, tmid, renderRow, showMessageInMainThread, serverVersion, hideSystemMessages, listRef, loading } , ref ) => {
9+ ( { rid, tmid, renderRow, showMessageInMainThread, serverVersion, hideSystemMessages, listRef } , ref ) => {
1110 const [ messages , messagesIds , fetchMessages ] = useMessages ( {
1211 rid,
1312 tmid,
@@ -33,13 +32,6 @@ const ListContainer = forwardRef<IListContainerRef, IListContainerProps>(
3332 cancelJumpToMessage
3433 } ) ) ;
3534
36- const renderFooter = ( ) => {
37- if ( loading && rid ) {
38- return < ActivityIndicator /> ;
39- }
40- return null ;
41- } ;
42-
4335 const renderItem : IListProps [ 'renderItem' ] = ( { item, index } ) => renderRow ( item , messages [ index + 1 ] , highlightedMessageId ) ;
4436
4537 return (
@@ -50,7 +42,6 @@ const ListContainer = forwardRef<IListContainerRef, IListContainerProps>(
5042 data = { messages }
5143 renderItem = { renderItem }
5244 onEndReached = { onEndReached }
53- ListFooterComponent = { renderFooter }
5445 onScrollToIndexFailed = { handleScrollToIndexFailed }
5546 viewabilityConfigCallbackPairs = { viewabilityConfigCallbackPairs . current }
5647 jumpToBottom = { jumpToBottom }
0 commit comments