You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-16 06:42:26 +03:00
don't show tooltips on big icons
fixes: https://github.com/vector-im/riot-web/issues/12191
This commit is contained in:
@@ -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) : ""} />;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user