fix loading EmojiList from server just one time

This commit is contained in:
Milos Holba
2021-02-23 16:58:00 +01:00
parent bf6cd34cf6
commit 595bce60eb
4 changed files with 44 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
return [
'version' => '1.8.2',
'version' => '1.8.3',
// Define size of chunk uploaded by MB. E.g. integer 128 means chunk size will be 128MB.
'chunk_size' => env('CHUNK_SIZE', '128'),

View File

@@ -78,5 +78,31 @@
"/js/main.fec7012ae1f34893589d.hot-update.js": "/js/main.fec7012ae1f34893589d.hot-update.js",
"/js/main.2ee91a6dae14a1cadc9b.hot-update.js": "/js/main.2ee91a6dae14a1cadc9b.hot-update.js",
"/js/main.9eae7983f12897789247.hot-update.js": "/js/main.9eae7983f12897789247.hot-update.js",
"/js/main.2d64c86de0df943928b2.hot-update.js": "/js/main.2d64c86de0df943928b2.hot-update.js"
"/js/main.2d64c86de0df943928b2.hot-update.js": "/js/main.2d64c86de0df943928b2.hot-update.js",
"/js/main.810cff99631b1efd948d.hot-update.js": "/js/main.810cff99631b1efd948d.hot-update.js",
"/js/main.e600f466db5401999c97.hot-update.js": "/js/main.e600f466db5401999c97.hot-update.js",
"/js/main.2366d38febb62b9adb88.hot-update.js": "/js/main.2366d38febb62b9adb88.hot-update.js",
"/js/main.e0881260a9842557986a.hot-update.js": "/js/main.e0881260a9842557986a.hot-update.js",
"/js/main.3d08984a88c66c048927.hot-update.js": "/js/main.3d08984a88c66c048927.hot-update.js",
"/js/main.8e3c4561e7e37ae6a6c1.hot-update.js": "/js/main.8e3c4561e7e37ae6a6c1.hot-update.js",
"/js/main.67f4fde7abcafd6d46c5.hot-update.js": "/js/main.67f4fde7abcafd6d46c5.hot-update.js",
"/js/main.744dab728ca297b5c462.hot-update.js": "/js/main.744dab728ca297b5c462.hot-update.js",
"/js/main.7d48fe14fdbe694bee34.hot-update.js": "/js/main.7d48fe14fdbe694bee34.hot-update.js",
"/js/main.7ec9c64cc2b9c20d5365.hot-update.js": "/js/main.7ec9c64cc2b9c20d5365.hot-update.js",
"/js/main.cce692fa367da3518f20.hot-update.js": "/js/main.cce692fa367da3518f20.hot-update.js",
"/js/main.40ba52ba134116d832b1.hot-update.js": "/js/main.40ba52ba134116d832b1.hot-update.js",
"/js/main.62dfdf2da6591cb17225.hot-update.js": "/js/main.62dfdf2da6591cb17225.hot-update.js",
"/js/main.946ae0aec96e272e7a9a.hot-update.js": "/js/main.946ae0aec96e272e7a9a.hot-update.js",
"/js/main.49bb07b2e7950c7b10d2.hot-update.js": "/js/main.49bb07b2e7950c7b10d2.hot-update.js",
"/js/main.bb3f47712b180dc5faef.hot-update.js": "/js/main.bb3f47712b180dc5faef.hot-update.js",
"/js/main.8d39b3a6f8e4002b8796.hot-update.js": "/js/main.8d39b3a6f8e4002b8796.hot-update.js",
"/js/main.f9998fbbf511469ba9be.hot-update.js": "/js/main.f9998fbbf511469ba9be.hot-update.js",
"/js/main.a6d99609236f7fad62dc.hot-update.js": "/js/main.a6d99609236f7fad62dc.hot-update.js",
"/js/main.b7b1ab3b35c30738be1c.hot-update.js": "/js/main.b7b1ab3b35c30738be1c.hot-update.js",
"/js/main.4454030fcb222eadbbf7.hot-update.js": "/js/main.4454030fcb222eadbbf7.hot-update.js",
"/js/main.98be4f9f79ead6a88087.hot-update.js": "/js/main.98be4f9f79ead6a88087.hot-update.js",
"/js/main.03760e0d6f650b4ab3c2.hot-update.js": "/js/main.03760e0d6f650b4ab3c2.hot-update.js",
"/js/main.259e21addde39ee619b6.hot-update.js": "/js/main.259e21addde39ee619b6.hot-update.js",
"/js/main.e436af8370789152a668.hot-update.js": "/js/main.e436af8370789152a668.hot-update.js",
"/js/main.05eb0aab71d0fb3b6b09.hot-update.js": "/js/main.05eb0aab71d0fb3b6b09.hot-update.js"
}

View File

@@ -151,17 +151,23 @@ export default {
}, 800),
openMenu() {
this.loadedList = false
this.selectOpen = !this.selectOpen
//Load emojis
if (this.selectOpen) {
// Load emojis from server just if not loaded already
if (this.selectOpen && ! this.emojis) {
this.$store.dispatch('getEmojisList').then((loaded) => {
this.loadedList = loaded
})
}
if ( ! this.selectOpen )
this.loadedList = false
// Simulate loading for the emojisList processing
if(this.emojis) {
setTimeout(() => {
this.loadedList = true
}, 20);
}
this.searchInput = ''

View File

@@ -39,8 +39,8 @@ export default {
},
computed: {
pickedEmoji () {
// If is color not seted send picked emoji via props to EmojiPicker for the EmojiSelected input
return !this.selectedColor ? this.selectedEmoji : ''
// If is color not selected and emoji is selected, push picked emoji to EmojiPicker for the EmojiSelected input
return !this.selectedColor && this.selectedEmoji ? this.selectedEmoji : ''
}
},
data() {
@@ -76,7 +76,7 @@ export default {
methods: {
setIcon(value) {
// Set emoji
// Set color
this.selectedColor = value.color
this.selectedEmoji = undefined
@@ -94,6 +94,9 @@ export default {
this.selectedEmoji = icon.value.emoji
this.selectedColor = undefined
}
// If want to set default folder icon from emoji, set selectedEmoji to undefined
icon.value === 'default' ? this.selectedEmoji = undefined : ''
})
// If folder have already set some color set this color to selected color