diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-05-31 12:42:24 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-05-31 12:42:24 +0900 |
| commit | 821bb1c4767bee84fd9e1196cfee0dabf92c431a (patch) | |
| tree | 66d6c06a35a6c2e6c410b18645e4e02eb7c56861 /packages/frontend/src/components/MkEmojiPicker.vue | |
| parent | tweak ui (diff) | |
| download | misskey-821bb1c4767bee84fd9e1196cfee0dabf92c431a.tar.gz misskey-821bb1c4767bee84fd9e1196cfee0dabf92c431a.tar.bz2 misskey-821bb1c4767bee84fd9e1196cfee0dabf92c431a.zip | |
perf(frontend): サーバーにカスタム絵文字の種類が多い場合のパフォーマンスの改善
Resolve #10925
Diffstat (limited to 'packages/frontend/src/components/MkEmojiPicker.vue')
| -rw-r--r-- | packages/frontend/src/components/MkEmojiPicker.vue | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/frontend/src/components/MkEmojiPicker.vue b/packages/frontend/src/components/MkEmojiPicker.vue index d489b3e9b9..b632baaa2b 100644 --- a/packages/frontend/src/components/MkEmojiPicker.vue +++ b/packages/frontend/src/components/MkEmojiPicker.vue @@ -101,7 +101,7 @@ import { isTouchUsing } from '@/scripts/touch'; import { deviceKind } from '@/scripts/device-kind'; import { i18n } from '@/i18n'; import { defaultStore } from '@/store'; -import { customEmojiCategories, customEmojis } from '@/custom-emojis'; +import { customEmojiCategories, customEmojis, customEmojisMap } from '@/custom-emojis'; import { $i } from '@/account'; const props = withDefaults(defineProps<{ @@ -337,7 +337,7 @@ function done(query?: string): boolean | void { if (query == null || typeof query !== 'string') return; const q2 = query.replace(/:/g, ''); - const exactMatchCustom = customEmojis.value.find(emoji => emoji.name === q2); + const exactMatchCustom = customEmojisMap.get(q2); if (exactMatchCustom) { chosen(exactMatchCustom); return true; |