fixed themes being in the wrong order in the command line

This commit is contained in:
Miodec 2021-08-18 13:18:02 +01:00
parent 6e011edb05
commit 374b1a19b0
2 changed files with 2 additions and 5 deletions

View file

@ -2135,10 +2135,6 @@ export let themeCommands = {
};
Misc.getThemesList().then((themes) => {
//sort themes by name
themes = themes.sort((a, b) => {
return a.name < b.name;
});
themes.forEach((theme) => {
themeCommands.list.push({
id: "changeTheme" + Misc.capitalizeFirstLetter(theme.name),

View file

@ -80,7 +80,8 @@ export async function getSortedThemesList() {
if (themesList == null) {
await getThemesList();
}
const sorted = themesList.sort((a, b) => {
let sorted = [...themesList];
sorted = sorted.sort((a, b) => {
let b1 = hexToHSL(a.bgColor);
let b2 = hexToHSL(b.bgColor);
return b2.lgt - b1.lgt;