summaryrefslogtreecommitdiffstats
path: root/webapp/stores/emoji_store.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-07-15 12:26:32 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-07-15 12:26:32 -0400
commitf7b3731b2b2767b0784e1f2e0ce723cae917c47a (patch)
treefd00d8da4bcbd671a9b1324dd500d133daf06e19 /webapp/stores/emoji_store.jsx
parent942ae4c5278e0a3064ef08937063ec66a6a8e990 (diff)
parentab52700aaa76a5623de23cd0156f5dbd9a24e264 (diff)
downloadchat-f7b3731b2b2767b0784e1f2e0ce723cae917c47a.tar.gz
chat-f7b3731b2b2767b0784e1f2e0ce723cae917c47a.tar.bz2
chat-f7b3731b2b2767b0784e1f2e0ce723cae917c47a.zip
Merge branch 'release-3.2' into 'master'
Diffstat (limited to 'webapp/stores/emoji_store.jsx')
-rw-r--r--webapp/stores/emoji_store.jsx12
1 files changed, 10 insertions, 2 deletions
diff --git a/webapp/stores/emoji_store.jsx b/webapp/stores/emoji_store.jsx
index 5e1d81dd3..e369885b4 100644
--- a/webapp/stores/emoji_store.jsx
+++ b/webapp/stores/emoji_store.jsx
@@ -54,12 +54,13 @@ class EmojiStore extends EventEmitter {
this.addCustomEmoji(emoji);
}
- // add custom emojis to the map first so that they can't override system ones
- this.emojis = new Map([...this.customEmojis, ...this.systemEmojis]);
+ this.updateEmojiMap();
}
addCustomEmoji(emoji) {
this.customEmojis.set(emoji.name, emoji);
+
+ // this doesn't update this.emojis, but it's only called by setCustomEmojis which does that afterwards
}
removeCustomEmoji(id) {
@@ -69,6 +70,13 @@ class EmojiStore extends EventEmitter {
break;
}
}
+
+ this.updateEmojiMap();
+ }
+
+ updateEmojiMap() {
+ // add custom emojis to the map first so that they can't override system ones
+ this.emojis = new Map([...this.customEmojis, ...this.systemEmojis]);
}
getSystemEmojis() {