diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2018-11-05 17:04:17 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-05 17:04:17 +0900 |
| commit | 54e9147782a0027cf23e80dc6d57f1504c0d8ca3 (patch) | |
| tree | d7c5722334aaabf7a0f4d406971f35460065158e /src/client | |
| parent | Make code better (diff) | |
| download | misskey-54e9147782a0027cf23e80dc6d57f1504c0d8ca3.tar.gz misskey-54e9147782a0027cf23e80dc6d57f1504c0d8ca3.tar.bz2 misskey-54e9147782a0027cf23e80dc6d57f1504c0d8ca3.zip | |
Refactoring codes
refs: https://github.com/syuilo/misskey/pull/3117#pullrequestreview-171437187
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/app/common/views/components/emoji.vue | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/app/common/views/components/emoji.vue b/src/client/app/common/views/components/emoji.vue index 6a078e023d..7429aaaa5b 100644 --- a/src/client/app/common/views/components/emoji.vue +++ b/src/client/app/common/views/components/emoji.vue @@ -37,10 +37,10 @@ export default Vue.extend({ methods: { exec() { const { emoji, raw, customEmojis } = this; - this.name = emoji || raw; - if (!raw && customEmojis && customEmojis.length) + this.name = emoji ? `:${emoji}:` : raw; + if (!raw && customEmojis && customEmojis.length) { this.url = customEmojis.find(x => findCustomEmoji(x, emoji)).url; - if (!this.url) { + } else { // *MEM: `customEmojis` always has a emoji named `emoji` const char = raw || lib[emoji] && lib[emoji].char; if (char) { this.url = `https://twemoji.maxcdn.com/2/svg/${char.codePointAt(0).toString(16)}.svg`; |