Remove `autoplayGifsAndVideos` workaround (#7852)

pull/21833/head
Šimon Brandner 2022-02-21 11:02:45 +01:00 committed by GitHub
parent fc9a221371
commit 9aa77f3417
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 17 deletions

View File

@ -116,23 +116,6 @@ export default class AccountSettingsHandler extends MatrixClientBackedSettingsHa
return content ? content['enabled'] : null; return content ? content['enabled'] : null;
} }
// Special case for autoplaying videos and GIFs
if (["autoplayGifs", "autoplayVideo"].includes(settingName)) {
const settings = this.getSettings() || {};
const value = settings[settingName];
// Fallback to old combined setting
if (value === null || value === undefined) {
const oldCombinedValue = settings["autoplayGifsAndVideos"];
// Write, so that we can remove this in the future
if (oldCombinedValue !== null && oldCombinedValue !== undefined) {
this.setValue("autoplayGifs", roomId, oldCombinedValue);
this.setValue("autoplayVideo", roomId, oldCombinedValue);
}
return oldCombinedValue;
}
return value;
}
if (settingName === "pseudonymousAnalyticsOptIn") { if (settingName === "pseudonymousAnalyticsOptIn") {
const content = this.getSettings(ANALYTICS_EVENT_TYPE) || {}; const content = this.getSettings(ANALYTICS_EVENT_TYPE) || {};
// Check to make sure that we actually got a boolean // Check to make sure that we actually got a boolean