From f538b3fb22da11cccd381196c7b5650edc2a3abf Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Mon, 2 Sep 2019 15:55:50 -0700
Subject: Using a proper twitter emoji list for the definitions.

- Fixes #260
---
 ui/src/components/comment-form.tsx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'ui/src/components/comment-form.tsx')

diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx
index 93ad69ea..54035fde 100644
--- a/ui/src/components/comment-form.tsx
+++ b/ui/src/components/comment-form.tsx
@@ -1,7 +1,8 @@
 import { Component, linkEvent } from 'inferno';
 import { CommentNode as CommentNodeI, CommentForm as CommentFormI, SearchForm, SearchType, SortType, UserOperation, SearchResponse } from '../interfaces';
 import { Subscription } from "rxjs";
-import { capitalizeFirstLetter, mentionDropdownFetchLimit, msgOp, md, emojiMentionList, mdToHtml, randomStr, imageUploadUrl, markdownHelpUrl } from '../utils';
+import { capitalizeFirstLetter, mentionDropdownFetchLimit, msgOp, mdToHtml, randomStr, imageUploadUrl, markdownHelpUrl } from '../utils';
+import { twemojis } from '../twemojis';
 import { WebSocketService, UserService } from '../services';
 import * as autosize from 'autosize';
 import { i18n } from '../i18next';
@@ -49,12 +50,12 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
           trigger: ':',
           menuItemTemplate: (item: any) => {
             let emoji = `:${item.original.key}:`;
-            return `${md.renderInline(emoji)}  ${emoji}`;
+            return `${item.original.val} ${emoji}`;
           },
           selectTemplate: (item: any) => {
             return `:${item.original.key}:`;
           },
-          values: emojiMentionList(),
+          values: Object.entries(twemojis).map(e => {return {'key': e[0], 'val': e[1]}}),
           allowSpaces: false,
           autocompleteMode: true,
           menuItemLimit: 10,
-- 
cgit v1.2.3

