diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index efda6c6d44..fb0878b880 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -939,25 +939,20 @@ class E2ePadlock extends React.Component { const Tooltip = sdk.getComponent("elements.Tooltip"); tooltip = ; } - if (SettingsStore.getValue("alwaysShowEncryptionIcons")) { - return ( -
{tooltip}
- ); - } else { - return ( -
{tooltip}
- ); + + let classes = `mx_EventTile_e2eIcon mx_EventTile_e2eIcon_${this.props.icon}`; + if (!SettingsStore.getValue("alwaysShowEncryptionIcons")) { + classes += ' mx_EventTile_e2eIcon_hidden'; } + + return ( +
{tooltip}
+ ); } }