diff --git a/src/client/app/common/views/components/emoji.vue b/src/client/app/common/views/components/emoji.vue index 0cc78a337b..20c1ea1a80 100644 --- a/src/client/app/common/views/components/emoji.vue +++ b/src/client/app/common/views/components/emoji.vue @@ -55,6 +55,20 @@ export default Vue.extend({ } }, + watch: { + customEmojis() { + if (this.name) { + const customEmoji = this.customEmojis.find(x => x.name == this.name); + if (customEmoji) { + this.customEmoji = customEmoji; + this.url = this.$store.state.device.disableShowingAnimatedImages + ? getStaticImageUrl(customEmoji.url) + : customEmoji.url; + } + } + }, + }, + created() { if (this.name) { const customEmoji = this.customEmojis.find(x => x.name == this.name); @@ -80,7 +94,7 @@ export default Vue.extend({ this.url = `${twemojiBase}/2/svg/${codes.join('-')}.svg`; } - } + }, }); diff --git a/src/client/app/common/views/components/reaction-icon.vue b/src/client/app/common/views/components/reaction-icon.vue index 022d57dc44..afe51d7833 100644 --- a/src/client/app/common/views/components/reaction-icon.vue +++ b/src/client/app/common/views/components/reaction-icon.vue @@ -15,9 +15,14 @@ export default Vue.extend({ }, data() { return { - customEmojis: (this.$root.getMetaSync() || { emojis: [] }).emojis || [] + customEmojis: [] }; }, + created() { + this.$root.getMeta().then(meta => { + if (meta && meta.emojis) this.customEmojis = meta.emojis; + }); + }, computed: { str(): any { switch (this.reaction) {