mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-10 02:25:27 +00:00
feat: require at least two characters to autocomplete emoji (#298)
This commit is contained in:
@@ -79,7 +79,9 @@ export function useAutoComplete(
|
||||
|
||||
if (current === ":" || current === "@" || current === "#") {
|
||||
const search = content.slice(j + 1, content.length);
|
||||
if (search.length > 0) {
|
||||
const minLen = current === ":" ? 2 : 1
|
||||
|
||||
if (search.length >= minLen) {
|
||||
return [
|
||||
current === "#"
|
||||
? "channel"
|
||||
|
||||
Reference in New Issue
Block a user