don't show tooltips on big icons

fixes: https://github.com/vector-im/riot-web/issues/12191
This commit is contained in:
Zoe 2020-02-13 10:11:48 +00:00
parent ec708b5e9b
commit 9649f2a2da

View file

@ -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 = <Tooltip label={e2eTitle ? _t(e2eTitle) : ""} />;
}