fix(app): accent colour not working
This commit is contained in:
parent
3d0631dd85
commit
575d50807a
@ -41,15 +41,15 @@ export function getUserAccentColor(
|
||||
profileAccentColor?: RawAccentColor,
|
||||
fallback = DEFAULT_ACCENT_COLOR,
|
||||
): string {
|
||||
if (user && typeof user.avatarColor === 'number') {
|
||||
return ColorUtils.int2hex(user.avatarColor);
|
||||
}
|
||||
|
||||
const profileColor = getAccentColorHex(profileAccentColor);
|
||||
if (profileColor) {
|
||||
return profileColor;
|
||||
}
|
||||
|
||||
if (user && typeof user.avatarColor === 'number') {
|
||||
return ColorUtils.int2hex(user.avatarColor);
|
||||
}
|
||||
|
||||
if (user && !user.avatar) {
|
||||
return ColorUtils.int2hex(getDefaultAvatarPrimaryColor(user.id));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user