Fix search offset not working when first time load with 'type'

This commit is contained in:
Lim Chee Aun 2023-07-13 20:10:39 +08:00
parent fa21eec06a
commit 1e28efd9bb

View file

@ -101,6 +101,10 @@ function Search(props) {
setStatusResults(results.statuses);
setAccountResults(results.accounts);
setHashtagResults(results.hashtags);
if (type) {
offsetRef.current = LIMIT;
setShowMore(results[type]?.length >= LIMIT);
}
}
setUiState('default');
} catch (err) {