From cad0fa05e5b02b8892a8516e5afbff11a65653d1 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 23 Oct 2018 15:33:45 +0200 Subject: [PATCH] hide name when collapsed --- src/components/structures/TopLeftMenuButton.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/structures/TopLeftMenuButton.js b/src/components/structures/TopLeftMenuButton.js index 17f55b120c..b2b375581d 100644 --- a/src/components/structures/TopLeftMenuButton.js +++ b/src/components/structures/TopLeftMenuButton.js @@ -72,6 +72,13 @@ export default class TopLeftMenuButton extends React.Component { const fallbackUserId = MatrixClientPeg.get().getUserId(); const profileInfo = this.state.profileInfo; const name = profileInfo ? profileInfo.name : fallbackUserId; + let nameElement; + if (!this.props.collapsed) { + nameElement =
+ { name } +
; + } + return ( -
- { name } -
+ { nameElement }
);