summaryrefslogtreecommitdiffstats
path: root/webapp/stores/emoji_store.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/stores/emoji_store.jsx')
-rw-r--r--webapp/stores/emoji_store.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/webapp/stores/emoji_store.jsx b/webapp/stores/emoji_store.jsx
index 076e671dd..fd72b4636 100644
--- a/webapp/stores/emoji_store.jsx
+++ b/webapp/stores/emoji_store.jsx
@@ -56,6 +56,7 @@ class EmojiStore extends EventEmitter {
this.addCustomEmoji(emoji);
}
+ this.sortCustomEmojis();
this.updateEmojiMap();
}
@@ -76,6 +77,10 @@ class EmojiStore extends EventEmitter {
this.updateEmojiMap();
}
+ sortCustomEmojis() {
+ this.customEmojis = new Map([...this.customEmojis.entries()].sort((a, b) => a[0].localeCompare(b[0])));
+ }
+
updateEmojiMap() {
// add custom emojis to the map first so that they can't override system ones
this.emojis = new Map([...this.customEmojis, ...this.systemEmojis]);