diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss
index 4bb81a2e53..3aa1622e05 100644
--- a/res/css/views/rooms/_EventTile.scss
+++ b/res/css/views/rooms/_EventTile.scss
@@ -298,6 +298,16 @@ limitations under the License.
cursor: pointer;
}
+.mx_EventTile_e2eIcon[hidden] {
+ display: none;
+}
+
+/* always override hidden attribute for blocked and warning */
+.mx_EventTile_e2eIcon[hidden][src="img/e2e-blocked.svg"],
+.mx_EventTile_e2eIcon[hidden][src="img/e2e-warning.svg"] {
+ display: block;
+}
+
.mx_EventTile_keyRequestInfo {
font-size: 12px;
}
diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js
index 85223c4eef..d0a7275da2 100644
--- a/src/components/structures/UserSettings.js
+++ b/src/components/structures/UserSettings.js
@@ -63,6 +63,7 @@ const gHVersionLabel = function(repo, token='') {
const SIMPLE_SETTINGS = [
{ id: "urlPreviewsEnabled" },
{ id: "autoplayGifsAndVideos" },
+ { id: "alwaysShowEncryptionIcons" },
{ id: "hideReadReceipts" },
{ id: "dontSendTypingNotifications" },
{ id: "alwaysShowTimestamps" },
diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js
index ed7851bf2d..565c8b5977 100644
--- a/src/components/views/rooms/EventTile.js
+++ b/src/components/views/rooms/EventTile.js
@@ -742,7 +742,11 @@ function E2ePadlockUnencrypted(props) {
}
function E2ePadlock(props) {
- return ;
+ if (SettingsStore.getValue("alwaysShowEncryptionIcons")) {
+ return ;
+ } else {
+ return ;
+ }
}
module.exports.getHandlerTile = getHandlerTile;
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index d90b120bad..33acb04f31 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -198,6 +198,7 @@
"Show timestamps in 12 hour format (e.g. 2:30pm)": "Show timestamps in 12 hour format (e.g. 2:30pm)",
"Always show message timestamps": "Always show message timestamps",
"Autoplay GIFs and videos": "Autoplay GIFs and videos",
+ "Always show encryption icons": "Always show encryption icons",
"Enable automatic language detection for syntax highlighting": "Enable automatic language detection for syntax highlighting",
"Hide avatars in user and room mentions": "Hide avatars in user and room mentions",
"Disable big emoji in chat": "Disable big emoji in chat",
diff --git a/src/settings/Settings.js b/src/settings/Settings.js
index 8e94be3be1..d214d5417f 100644
--- a/src/settings/Settings.js
+++ b/src/settings/Settings.js
@@ -150,6 +150,11 @@ export const SETTINGS = {
displayName: _td('Autoplay GIFs and videos'),
default: false,
},
+ "alwaysShowEncryptionIcons": {
+ supportedLevels: LEVELS_ACCOUNT_SETTINGS,
+ displayName: _td('Always show encryption icons'),
+ default: true,
+ },
"enableSyntaxHighlightLanguageDetection": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td('Enable automatic language detection for syntax highlighting'),