From 1c60cf04a70c628e2c801cf671cde81b6851953f Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Wed, 2 Jul 2025 04:48:55 +0300 Subject: [PATCH] Revert "After deleting expense and returning to Chats messages display fallback avatar" --- src/components/Search/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index ad47dbc87929..0561ce0009cd 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -175,12 +175,9 @@ function Search({queryJSON, currentSearchResults, lastNonEmptySearchResults, onS const searchListRef = useRef(null); useEffect(() => { - if (!isFocused) { - return; - } clearSelectedTransactions(hash); setCurrentSearchHash(hash); - }, [hash, clearSelectedTransactions, setCurrentSearchHash, isFocused]); + }, [hash, clearSelectedTransactions, setCurrentSearchHash]); const searchResults = currentSearchResults?.data ? currentSearchResults : lastNonEmptySearchResults; const isSearchResultsEmpty = !searchResults?.data || isSearchResultsEmptyUtil(searchResults); @@ -218,11 +215,12 @@ function Search({queryJSON, currentSearchResults, lastNonEmptySearchResults, onS }, [isSmallScreenWidth, selectedTransactions, selectionMode?.isEnabled]); useEffect(() => { - if (isOffline || !isFocused) { + if (isOffline) { return; } + handleSearch({queryJSON, offset}); - }, [handleSearch, isOffline, offset, queryJSON, isFocused]); + }, [handleSearch, isOffline, offset, queryJSON]); useEffect(() => { openSearch();