Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

fix(app): accent colour not working

Hampus Kraft575d50807a39
diff --git a/fluxer_app/src/utils/AccentColorUtils.tsx b/fluxer_app/src/utils/AccentColorUtils.tsx
index 8f5f52548..27ee28230 100644
--- a/fluxer_app/src/utils/AccentColorUtils.tsx
+++ b/fluxer_app/src/utils/AccentColorUtils.tsx
@@ -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));
}