diff --git a/native/chat/chat-thread-list.react.js b/native/chat/chat-thread-list.react.js --- a/native/chat/chat-thread-list.react.js +++ b/native/chat/chat-thread-list.react.js @@ -139,6 +139,7 @@ ) => void, +onPressSeeMoreSidebars: (threadInfo: ThreadInfo) => void, +hardwareBack: () => boolean, + +renderItem: (row: { item: Item, ... }) => React.Node, }; class ChatThreadList extends React.PureComponent { @@ -225,30 +226,6 @@ } }; - renderItem = (row: { item: Item, ... }) => { - const item = row.item; - if (item.type === 'search') { - return ( - - {this.props.renderSearch({ active: false })} - - ); - } - if (item.type === 'empty') { - const EmptyItem = item.emptyItem; - return ; - } - return ( - - ); - }; - listDataSelector = createSelector( (props: Props) => props.chatListData, (props: Props) => props.searchStatus, @@ -341,7 +318,7 @@ {fixedSearch} { + const item = row.item; + if (item.type === 'search') { + return ( + + {renderSearch({ active: false })} + + ); + } + if (item.type === 'empty') { + const EmptyItem = item.emptyItem; + return ; + } + return ( + + ); + }, + [ + onPressItem, + onPressSeeMoreSidebars, + onSearchFocus, + onSwipeableWillOpen, + openedSwipeableID, + renderSearch, + ], + ); + return ( ); }