Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Improve emoji in composer #6650

Merged
merged 3 commits into from
Aug 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/autocomplete/EmojiProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class EmojiProvider extends AutocompleteProvider {
constructor() {
super(EMOJI_REGEX);
this.matcher = new QueryMatcher<ISortedEmoji>(SORTED_EMOJI, {
keys: ['emoji.emoticon'],
keys: [],
novocaine marked this conversation as resolved.
Show resolved Hide resolved
funcs: [o => o.emoji.shortcodes.map(s => `:${s}:`)],
// For matching against ascii equivalents
shouldMatchWordsOnly: false,
Expand All @@ -91,7 +91,8 @@ export default class EmojiProvider extends AutocompleteProvider {

let completions = [];
const { command, range } = this.getCurrentCommand(query, selection);
if (command) {

if (command && command[0].length > 2) {
const matchedString = command[0];
completions = this.matcher.match(matchedString, limit);

Expand Down