start loading emoji when picker is open

This commit is contained in:
Henry Jameson 2019-10-08 20:54:30 +03:00
parent 37b8490c01
commit bed109ae46
2 changed files with 2 additions and 3 deletions

View file

@ -165,6 +165,7 @@ const EmojiInput = {
methods: { methods: {
triggerShowPicker () { triggerShowPicker () {
this.showPicker = true this.showPicker = true
this.$refs.picker.startEmojiLoad()
this.$nextTick(() => { this.$nextTick(() => {
this.scrollIntoView() this.scrollIntoView()
}) })
@ -181,6 +182,7 @@ const EmojiInput = {
this.showPicker = !this.showPicker this.showPicker = !this.showPicker
if (this.showPicker) { if (this.showPicker) {
this.scrollIntoView() this.scrollIntoView()
this.$refs.picker.startEmojiLoad()
} }
}, },
replace (replacement) { replace (replacement) {

View file

@ -33,9 +33,6 @@ const EmojiPicker = {
components: { components: {
StickerPicker: () => import('../sticker_picker/sticker_picker.vue') StickerPicker: () => import('../sticker_picker/sticker_picker.vue')
}, },
mounted () {
this.startEmojiLoad()
},
methods: { methods: {
onEmoji (emoji) { onEmoji (emoji) {
const value = emoji.imageUrl ? `:${emoji.displayText}:` : emoji.replacement const value = emoji.imageUrl ? `:${emoji.displayText}:` : emoji.replacement