fix(app): accent colour not working

This commit is contained in:
Hampus Kraft committed 2026-02-21 16:57:08 +00:00
1 parent 3d0631dd85
commit 575d50807a
1 file changed
+4 -4
+4 -4
View File
@@ -41,15 +41,15 @@ export function getUserAccentColor(
profileAccentColor?: RawAccentColor, profileAccentColor?: RawAccentColor,
fallback = DEFAULT_ACCENT_COLOR, fallback = DEFAULT_ACCENT_COLOR,
): string { ): string {
if (user && typeof user.avatarColor === 'number') {
return ColorUtils.int2hex(user.avatarColor);
}
const profileColor = getAccentColorHex(profileAccentColor); const profileColor = getAccentColorHex(profileAccentColor);
if (profileColor) { if (profileColor) {
return profileColor; return profileColor;
} }
if (user && typeof user.avatarColor === 'number') {
return ColorUtils.int2hex(user.avatarColor);
}
if (user && !user.avatar) { if (user && !user.avatar) {
return ColorUtils.int2hex(getDefaultAvatarPrimaryColor(user.id)); return ColorUtils.int2hex(getDefaultAvatarPrimaryColor(user.id));
} }