fix recent emojis threshold

This commit is contained in:
7w1 committed 2026-03-07 20:05:33 -06:00
1 parent c665839f9d
commit 281669f5af
2 files changed
+11 -1

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
sable: patch
---
Fix recent emojis ignoring letter threshold.
@@ -70,7 +70,12 @@ export function EmoticonAutocomplete({
getEmoticonSearchStr,
SEARCH_OPTIONS
);
const autoCompleteEmoticon = result ? result.items.slice(0, 20) : recentEmoji;
const autoCompleteEmoticon = useMemo(() => {
if (query.text.length < emojiThreshold) {
return [];
}
return result ? result.items.slice(0, 20) : recentEmoji;
}, [query.text.length, emojiThreshold, result, recentEmoji]);
useEffect(() => {
if (query.text && query.text.length >= emojiThreshold) {