From 86b6ec5212af58db01335e3c019e9f893a51f73d Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Mon, 5 Jun 2017 21:56:43 +0200 Subject: [PATCH] Tweak emoji names to only use one array when loading file --- Resources/Plugins/emoji-keyboard/browser.js | 24 +++------------------ 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/Resources/Plugins/emoji-keyboard/browser.js b/Resources/Plugins/emoji-keyboard/browser.js index ffc750ff..54a74b60 100644 --- a/Resources/Plugins/emoji-keyboard/browser.js +++ b/Resources/Plugins/emoji-keyboard/browser.js @@ -206,10 +206,6 @@ ready(){ }; $TDP.readFileRoot(this.$token, "emoji-ordering.txt").then(contents => { - let names1 = []; - let names2 = []; - let names3 = []; - for(let skinTone of this.skinToneList){ this.emojiData2[skinTone] = []; } @@ -277,32 +273,18 @@ ready(){ } else{ addDeclaration2(null, decl); - names2.push(desc); + this.emojiNames.push(desc); } } else if (skinToneState === 2){ addDeclaration3(decl); - names3.push(desc); + this.emojiNames.push(desc); } else if (skinToneState === 0){ addDeclaration1(decl); - names1.push(desc); + this.emojiNames.push(desc); } } - - // final processing - - for(let name of names1){ - this.emojiNames.push(name); - } - - for(let name of names2){ - this.emojiNames.push(name); - } - - for(let name of names3){ - this.emojiNames.push(name); - } }).catch(err => { $TD.alert("error", "Problem loading emoji keyboard: "+err.message); });