aboutsummaryrefslogtreecommitdiff
path: root/src/components/emoji_picker/emoji_picker.js
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2023-01-02 14:01:56 -0500
committertusooa <tusooa@kazv.moe>2023-01-02 14:01:56 -0500
commit47af5419b13688893a38c34fd55f4edf58dad6b2 (patch)
tree832dd89b1145b844e3537ff9340dcca1096ee079 /src/components/emoji_picker/emoji_picker.js
parent081a4161034ce6d748a11e260b7a9429c65aab9d (diff)
Clean up code
Diffstat (limited to 'src/components/emoji_picker/emoji_picker.js')
-rw-r--r--src/components/emoji_picker/emoji_picker.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js
index ca2a3683..4a447905 100644
--- a/src/components/emoji_picker/emoji_picker.js
+++ b/src/components/emoji_picker/emoji_picker.js
@@ -192,13 +192,9 @@ const EmojiPicker = {
setScroll(right + margin - headerCont.clientWidth)
}
},
- highlight (index) {
+ highlight (groupId) {
this.setShowStickers(false)
- const item = this.filteredEmojiGroups[index]
- if (!item) {
- return
- }
- const indexInList = this.emojiItems.findIndex(k => k.id === item.id)
+ const indexInList = this.emojiItems.findIndex(k => k.id === groupId)
this.$refs['emoji-groups'].scrollToItem(indexInList)
},
updateScrolledClass (target) {
@@ -261,9 +257,6 @@ const EmojiPicker = {
this.filteredEmojiGroups = this.getFilteredEmojiGroups()
}
},
- mounted () {
- this.recalculateItemPerRow()
- },
computed: {
minItemSize () {
return this.emojiHeight