+
{
if (!PlatformPeg.get()) return;
+ // Dev note: please keep this log line, it's useful when troubleshooting a MatrixClient suddenly
+ // stopping in the middle of the logs.
+ console.log("Clear cache & reload clicked");
MatrixClientPeg.get().stopClient();
MatrixClientPeg.get().store.deleteAllData().done(() => {
PlatformPeg.get().reload();
@@ -226,7 +229,7 @@ export default class HelpUserSettingsTab extends React.Component {
- {_t("Clear Cache and Reload")}
+ {_t("Clear cache and reload")}
diff --git a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js
index 6528c86f19..30f46754b7 100644
--- a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js
+++ b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js
@@ -43,6 +43,7 @@ export default class PreferencesUserSettingsTab extends React.Component {
'showJoinLeaves',
'showAvatarChanges',
'showDisplaynameChanges',
+ 'showImages',
];
static ROOM_LIST_SETTINGS = [
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 5a683ce92d..d1eb4f99d5 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -369,6 +369,7 @@
"Low bandwidth mode": "Low bandwidth mode",
"Allow fallback call assist server turn.matrix.org when your homeserver does not offer one (your IP address would be shared during a call)": "Allow fallback call assist server turn.matrix.org when your homeserver does not offer one (your IP address would be shared during a call)",
"Send read receipts for messages (requires compatible homeserver to disable)": "Send read receipts for messages (requires compatible homeserver to disable)",
+ "Show previews/thumbnails for images": "Show previews/thumbnails for images",
"Collecting app version information": "Collecting app version information",
"Collecting logs": "Collecting logs",
"Uploading report": "Uploading report",
@@ -617,7 +618,7 @@
"Bug reporting": "Bug reporting",
"If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.": "If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.",
"Submit debug logs": "Submit debug logs",
- "Clear Cache and Reload": "Clear Cache and Reload",
+ "Clear cache and reload": "Clear cache and reload",
"FAQ": "FAQ",
"Versions": "Versions",
"matrix-react-sdk version:": "matrix-react-sdk version:",
@@ -949,9 +950,9 @@
"Securely back up your keys to avoid losing them.
Learn more.": "Securely back up your keys to avoid losing them.
Learn more.",
"Not now": "Not now",
"Don't ask me again": "Don't ask me again",
- "It has %(count)s unread messages including mentions.|other": "It has %(count)s unread messages including mentions.",
- "It has %(count)s unread messages.|other": "It has %(count)s unread messages.",
- "It has unread mentions.": "It has unread mentions.",
+ "%(count)s unread messages including mentions.|other": "%(count)s unread messages including mentions.",
+ "%(count)s unread messages.|other": "%(count)s unread messages.",
+ "Unread mentions.": "Unread mentions.",
"Add a topic": "Add a topic",
"Upgrading this room will shut down the current instance of the room and create an upgraded room with the same name.": "Upgrading this room will shut down the current instance of the room and create an upgraded room with the same name.",
"This room has already been upgraded.": "This room has already been upgraded.",
@@ -1036,6 +1037,7 @@
"Download %(text)s": "Download %(text)s",
"Invalid file%(extra)s": "Invalid file%(extra)s",
"Error decrypting image": "Error decrypting image",
+ "Show image": "Show image",
"Error decrypting video": "Error decrypting video",
"Agree": "Agree",
"Disagree": "Disagree",
@@ -1124,6 +1126,7 @@
"No results": "No results",
"Yes": "Yes",
"No": "No",
+ "Please
create a new issue on GitHub so that we can investigate this bug.": "Please
create a new issue on GitHub so that we can investigate this bug.",
"Communities": "Communities",
"You cannot delete this image. (%(code)s)": "You cannot delete this image. (%(code)s)",
"Uploaded on %(date)s by %(user)s": "Uploaded on %(date)s by %(user)s",
diff --git a/src/settings/Settings.js b/src/settings/Settings.js
index c82b7a0c71..102efaa75a 100644
--- a/src/settings/Settings.js
+++ b/src/settings/Settings.js
@@ -413,4 +413,9 @@ export const SETTINGS = {
),
default: true,
},
+ "showImages": {
+ supportedLevels: LEVELS_ACCOUNT_SETTINGS,
+ displayName: _td("Show previews/thumbnails for images"),
+ default: true,
+ },
};
diff --git a/src/utils/WidgetUtils.js b/src/utils/WidgetUtils.js
index 237db82365..36907da5ab 100644
--- a/src/utils/WidgetUtils.js
+++ b/src/utils/WidgetUtils.js
@@ -233,7 +233,9 @@ export default class WidgetUtils {
};
const client = MatrixClientPeg.get();
- const userWidgets = WidgetUtils.getUserWidgets();
+ // Get the current widgets and clone them before we modify them, otherwise
+ // we'll modify the content of the old event.
+ const userWidgets = JSON.parse(JSON.stringify(WidgetUtils.getUserWidgets()));
// Delete existing widget with ID
try {