mirror of https://github.com/zulip/zulip.git
Don't autocomplete emoji until the 2nd letter 💻
(imported from commit 25986e2c3d939b61c4eb71596944748522d2cb54)
This commit is contained in:
parent
b5273b4c25
commit
8c7156acfa
|
@ -37,7 +37,7 @@ function composebox_typeahead_highlighter(item) {
|
|||
return typeahead_helper.highlight_with_escaping(this.query, item);
|
||||
}
|
||||
|
||||
function query_matches_person (query, person) {
|
||||
function query_matches_person(query, person) {
|
||||
// Case-insensitive.
|
||||
query = query.toLowerCase();
|
||||
|
||||
|
@ -46,7 +46,12 @@ function query_matches_person (query, person) {
|
|||
|
||||
}
|
||||
|
||||
function query_matches_emoji (query, emoji) {
|
||||
function query_matches_emoji(query, emoji) {
|
||||
// We don't want to match non-emoji emoticons such
|
||||
// as :P or :-p
|
||||
if (/^-?.$/.test(query)) {
|
||||
return false;
|
||||
}
|
||||
return (emoji.emoji_name.indexOf(query.toLowerCase()) !== -1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue