mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 12:16:53 +02:00
don't show tooltips on big icons
fixes: https://github.com/vector-im/riot-web/issues/12191
This commit is contained in:
parent
ec708b5e9b
commit
9649f2a2da
@ -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) : ""} />;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user