fix(app): accent colour not working
This commit is contained in:
parent
3d0631dd85
commit
575d50807a
@ -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));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user