custom theme edit fix (#3236)

This commit is contained in:
aNOOBis 2022-06-26 05:55:26 -07:00 committed by GitHub
parent 4092d45887
commit b74215a683
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1088,12 +1088,13 @@ list["updateCustomTheme"] = new SimplePopup(
}
const newTheme = {
name: name,
name: name.replaceAll(" ", "_"),
colors: newColors,
};
Loader.show();
await DB.editCustomTheme(customTheme._id, newTheme);
const validation = await DB.editCustomTheme(customTheme._id, newTheme);
Loader.hide();
if (!validation) return;
UpdateConfig.setCustomThemeColors(newColors);
Notifications.add("Custom theme updated", 1);
ThemePicker.refreshButtons();