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 @@ -204,13 +204,13 @@ const onPressItem = React.useCallback( (threadInfo: ThreadInfo, pendingPersonalThreadUserInfo?: UserInfo) => { - onChangeSearchText(''); + setSearchText(''); if (searchInputRef.current) { searchInputRef.current.blur(); } navigateToThread({ threadInfo, pendingPersonalThreadUserInfo }); }, - [navigateToThread, onChangeSearchText], + [navigateToThread], ); const onPressSeeMoreSidebars = React.useCallback( @@ -459,18 +459,6 @@ } }, [navigation, route.name]); - React.useEffect(() => { - const clearNavigationBlurListener = navigation.addListener('blur', () => { - setNumItemsToDisplay(defaultNumItemsToDisplay); - }); - - return () => { - // `.addListener` returns function that can be called to unsubscribe. - // https://reactnavigation.org/docs/navigation-events/#navigationaddlistener - clearNavigationBlurListener(); - }; - }, [navigation]); - React.useEffect(() => { const chatNavigation = navigation.getParent< ScreenParamList,