From 99490cdb21d577024a718084529c4ecd8079a557 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 13 Aug 2024 23:54:18 +0300 Subject: [PATCH] speed up emoji picker somewhat --- src/components/emoji_picker/emoji_picker.js | 4 +++- src/components/emoji_picker/emoji_picker.vue | 1 + src/modules/instance.js | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index d71bc1bb..9ea5c877 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -150,7 +150,9 @@ const EmojiPicker = { }, showPicker () { this.$refs.popover.showPopover() - this.onShowing() + this.$nextTick(() => { + this.onShowing() + }) }, hidePicker () { this.$refs.popover.hidePopover() diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue index 7c36deaa..a3dc8f9e 100644 --- a/src/components/emoji_picker/emoji_picker.vue +++ b/src/components/emoji_picker/emoji_picker.vue @@ -89,6 +89,7 @@ class="emoji-groups" :class="groupsScrolledClass" :min-item-size="minItemSize" + :buffer="minItemSize" :items="emojiItems" :emit-update="true" @update="onScroll" diff --git a/src/modules/instance.js b/src/modules/instance.js index 2281141f..cc114505 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -374,6 +374,8 @@ const instance = { // should have been "pack" field, that would be more useful }).sort(byPackThenByName) commit('setInstanceOption', { name: 'customEmoji', value: emoji }) + state.standardEmojiGroupList = null + state.standardEmojiList = null } else { throw (res) }