mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 04:53:08 +02:00
Refactoring codes
refs: https://github.com/syuilo/misskey/pull/3117#pullrequestreview-171437187
This commit is contained in:
parent
31b7626d01
commit
54e9147782
1 changed files with 3 additions and 3 deletions
|
@ -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`;
|
||||
|
|
Loading…
Reference in a new issue