Skip to content

Commit b95a76e

Browse files
authored
Merge pull request Expensify#65300 from Expensify/revert-64403-fix/63300
[No QA] Revert "After deleting expense and returning to Chats messages display fallback avatar"
2 parents 46b07dd + 1c60cf0 commit b95a76e

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/components/Search/index.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,9 @@ function Search({queryJSON, currentSearchResults, lastNonEmptySearchResults, onS
175175
const searchListRef = useRef<SelectionListHandle | null>(null);
176176

177177
useEffect(() => {
178-
if (!isFocused) {
179-
return;
180-
}
181178
clearSelectedTransactions(hash);
182179
setCurrentSearchHash(hash);
183-
}, [hash, clearSelectedTransactions, setCurrentSearchHash, isFocused]);
180+
}, [hash, clearSelectedTransactions, setCurrentSearchHash]);
184181

185182
const searchResults = currentSearchResults?.data ? currentSearchResults : lastNonEmptySearchResults;
186183
const isSearchResultsEmpty = !searchResults?.data || isSearchResultsEmptyUtil(searchResults);
@@ -218,11 +215,12 @@ function Search({queryJSON, currentSearchResults, lastNonEmptySearchResults, onS
218215
}, [isSmallScreenWidth, selectedTransactions, selectionMode?.isEnabled]);
219216

220217
useEffect(() => {
221-
if (isOffline || !isFocused) {
218+
if (isOffline) {
222219
return;
223220
}
221+
224222
handleSearch({queryJSON, offset});
225-
}, [handleSearch, isOffline, offset, queryJSON, isFocused]);
223+
}, [handleSearch, isOffline, offset, queryJSON]);
226224

227225
useEffect(() => {
228226
openSearch();

0 commit comments

Comments
 (0)