perf: call getIconbackgrounds once

instead of 20x on topic/topic list load
This commit is contained in:
Barış Soner Uşaklı
2024-06-11 17:20:31 -04:00
parent 1c44f55d3c
commit 1dadd16f4b
9 changed files with 41 additions and 38 deletions

View File

@@ -656,7 +656,7 @@ usersAPI.changePicture = async (caller, data) => {
picture = returnData && returnData.picture;
}
const validBackgrounds = await user.getIconBackgrounds(caller.uid);
const validBackgrounds = await user.getIconBackgrounds();
if (!validBackgrounds.includes(data.bgColor)) {
data.bgColor = validBackgrounds[0];
}