mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-27 23:53:08 +02:00
Fix: カスタム絵文字リアクションがたまに文字になってしまう (#5105)
This commit is contained in:
parent
26f2ae093b
commit
411f038f34
2 changed files with 21 additions and 2 deletions
|
@ -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`;
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue