]> Untitled Git - lemmy.git/commitdiff
Make sure typing dropdown uses twemojis.
authorDessalines <tyhou13@gmx.com>
Sun, 12 Apr 2020 15:45:44 +0000 (11:45 -0400)
committerDessalines <tyhou13@gmx.com>
Sun, 12 Apr 2020 15:45:44 +0000 (11:45 -0400)
ui/src/utils.ts

index 7c3c4205ab96e093bd9c81914844c283b154e7b2..fd23bf9ea251748838613334bac56827dad7c21f 100644 (file)
@@ -482,8 +482,9 @@ export function setupTribute(): Tribute {
       {
         trigger: ':',
         menuItemTemplate: (item: any) => {
-          let emoji = `:${item.original.key}:`;
-          return `${item.original.val} ${emoji}`;
+          let shortName = `:${item.original.key}:`;
+          let twemojiIcon = twemoji.parse(item.original.val);
+          return `${twemojiIcon} ${shortName}`;
         },
         selectTemplate: (item: any) => {
           return `:${item.original.key}:`;