From 9649f2a2da62bdf5d2b517df537631d0638d5718 Mon Sep 17 00:00:00 2001 From: Zoe Date: Thu, 13 Feb 2020 10:11:48 +0000 Subject: [PATCH] don't show tooltips on big icons fixes: https://github.com/vector-im/riot-web/issues/12191 --- src/components/views/rooms/E2EIcon.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/E2EIcon.js b/src/components/views/rooms/E2EIcon.js index 9480accb1a..39a90d1bec 100644 --- a/src/components/views/rooms/E2EIcon.js +++ b/src/components/views/rooms/E2EIcon.js @@ -52,6 +52,8 @@ const legacyRoomTitles = { }; const E2EIcon = ({isUser, status, className, size, onClick}) => { + const sizeThreshold = 25; // the size of an avatar + 1 + const [hover, setHover] = useState(false); const classes = classNames({ @@ -82,7 +84,7 @@ const E2EIcon = ({isUser, status, className, size, onClick}) => { const onMouseOut = () => setHover(false); let tip; - if (hover) { + if (hover && (!size || size <= sizeThreshold)) { tip = ; }