From c3af1a2f95ff5ed59d093f32a03fec7f8f0f9f25 Mon Sep 17 00:00:00 2001 From: Zoe Date: Thu, 13 Feb 2020 13:47:39 +0000 Subject: [PATCH] don't be too magic about hiding tooltips --- src/components/views/right_panel/VerificationPanel.js | 2 +- src/components/views/rooms/E2EIcon.js | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/views/right_panel/VerificationPanel.js b/src/components/views/right_panel/VerificationPanel.js index a8d4ce733b..69eb55f9b2 100644 --- a/src/components/views/right_panel/VerificationPanel.js +++ b/src/components/views/right_panel/VerificationPanel.js @@ -149,7 +149,7 @@ export default class VerificationPanel extends React.PureComponent {

{_t("You've successfully verified %(displayName)s!", { displayName: member.displayName || member.name || member.userId, })}

- +

Verify all users in a room to ensure it's secure.

diff --git a/src/components/views/rooms/E2EIcon.js b/src/components/views/rooms/E2EIcon.js index 39a90d1bec..a2c99fad99 100644 --- a/src/components/views/rooms/E2EIcon.js +++ b/src/components/views/rooms/E2EIcon.js @@ -51,9 +51,7 @@ const legacyRoomTitles = { [E2E_STATE.VERIFIED]: _td("All sessions in this encrypted room are trusted"), }; -const E2EIcon = ({isUser, status, className, size, onClick}) => { - const sizeThreshold = 25; // the size of an avatar + 1 - +const E2EIcon = ({isUser, status, className, size, onClick, hideTooltip}) => { const [hover, setHover] = useState(false); const classes = classNames({ @@ -84,7 +82,7 @@ const E2EIcon = ({isUser, status, className, size, onClick}) => { const onMouseOut = () => setHover(false); let tip; - if (hover && (!size || size <= sizeThreshold)) { + if (hover && !hideTooltip) { tip = ; }