From 0170fa608e1ee0b3b02e3c29c4718f5d7dd5ca6d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 21 Oct 2020 14:11:39 +0100 Subject: [PATCH] Fix User Menu avatar colouring being based on wrong string Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/UserMenu.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/structures/UserMenu.tsx b/src/components/structures/UserMenu.tsx index cdf1d8e543..64ee94628e 100644 --- a/src/components/structures/UserMenu.tsx +++ b/src/components/structures/UserMenu.tsx @@ -452,7 +452,8 @@ export default class UserMenu extends React.Component { public render() { const avatarSize = 32; // should match border-radius of the avatar - const displayName = OwnProfileStore.instance.displayName || MatrixClientPeg.get().getUserId(); + const userId = MatrixClientPeg.get().getUserId(); + const displayName = OwnProfileStore.instance.displayName || userId; const avatarUrl = OwnProfileStore.instance.getHttpAvatarUrl(avatarSize); const prototypeCommunityName = CommunityPrototypeStore.instance.getSelectedCommunityName(); @@ -507,7 +508,7 @@ export default class UserMenu extends React.Component {