From 890564e1daeec3b4b08e933945640ecead48a12e Mon Sep 17 00:00:00 2001 From: tamaina Date: Mon, 16 Jan 2023 10:56:43 +0000 Subject: [PATCH] refactor --- packages/frontend/src/components/MkAutocomplete.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/components/MkAutocomplete.vue b/packages/frontend/src/components/MkAutocomplete.vue index f85c92cecd..2cb3aeb3d8 100644 --- a/packages/frontend/src/components/MkAutocomplete.vue +++ b/packages/frontend/src/components/MkAutocomplete.vue @@ -62,6 +62,7 @@ type EmojiDef = { const lib = emojilist.filter(x => x.category !== 'flags'); const emojiDb = computed(() => { + //#region Unicode Emoji const char2path = defaultStore.reactiveState.emojiStyle.value === 'twemoji' ? char2twemojiFilePath : char2fluentEmojiFilePath; const unicodeEmojiDB: EmojiDef[] = lib.map(x => ({ @@ -84,8 +85,9 @@ const emojiDb = computed(() => { } unicodeEmojiDB.sort((a, b) => a.name.length - b.name.length); + //#endregion - //#region Construct Emoji DB + //#region Custom Emoji const customEmojiDB: EmojiDef[] = []; for (const x of customEmojis.value) { @@ -108,6 +110,7 @@ const emojiDb = computed(() => { } customEmojiDB.sort((a, b) => a.name.length - b.name.length); + //#endregion return markRaw([ ...customEmojiDB, ...unicodeEmojiDB ]); });