mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 13:05:32 +09:00
fix(app): accent colour not working
This commit is contained in:
1 file changed
+4
-4
@@ -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));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user