Hide the "Message" button in the sidebar if the CreateRooms components should not be shown (#9271)
* Hide the "Message" button in the sidebar if the CreateRooms components should not be shown Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net> * Add tests to check if the message button is correctly hidden by the customisations Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net> * Use the testing-library instead of enzyme Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net> * Fix type error Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net> * Smaller test change, prettier Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net> --------- Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net> Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net> Co-authored-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net> Co-authored-by: maheichyk <mikhail.aheichyk@gmail.com>
This commit is contained in:
parent
38f791b79d
commit
11f45f5413
2 changed files with 38 additions and 1 deletions
|
@ -521,7 +521,8 @@ export const UserOptionsSection: React.FC<{
|
|||
</AccessibleButton>
|
||||
);
|
||||
|
||||
const directMessageButton = isMe ? null : <MessageButton member={member} />;
|
||||
const directMessageButton =
|
||||
isMe || !shouldShowComponent(UIComponent.CreateRooms) ? null : <MessageButton member={member} />;
|
||||
|
||||
return (
|
||||
<div className="mx_UserInfo_container">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue