mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-20 03:15:47 +02:00
Tweak emoji names to only use one array when loading file
This commit is contained in:
parent
775e70bc45
commit
86b6ec5212
@ -206,10 +206,6 @@ ready(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
$TDP.readFileRoot(this.$token, "emoji-ordering.txt").then(contents => {
|
$TDP.readFileRoot(this.$token, "emoji-ordering.txt").then(contents => {
|
||||||
let names1 = [];
|
|
||||||
let names2 = [];
|
|
||||||
let names3 = [];
|
|
||||||
|
|
||||||
for(let skinTone of this.skinToneList){
|
for(let skinTone of this.skinToneList){
|
||||||
this.emojiData2[skinTone] = [];
|
this.emojiData2[skinTone] = [];
|
||||||
}
|
}
|
||||||
@ -277,32 +273,18 @@ ready(){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
addDeclaration2(null, decl);
|
addDeclaration2(null, decl);
|
||||||
names2.push(desc);
|
this.emojiNames.push(desc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (skinToneState === 2){
|
else if (skinToneState === 2){
|
||||||
addDeclaration3(decl);
|
addDeclaration3(decl);
|
||||||
names3.push(desc);
|
this.emojiNames.push(desc);
|
||||||
}
|
}
|
||||||
else if (skinToneState === 0){
|
else if (skinToneState === 0){
|
||||||
addDeclaration1(decl);
|
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 => {
|
}).catch(err => {
|
||||||
$TD.alert("error", "Problem loading emoji keyboard: "+err.message);
|
$TD.alert("error", "Problem loading emoji keyboard: "+err.message);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user