From 9aa77f34174b124caf3dc1d11d52a1d42ae23e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Mon, 21 Feb 2022 11:02:45 +0100 Subject: [PATCH] Remove `autoplayGifsAndVideos` workaround (#7852) --- src/settings/handlers/AccountSettingsHandler.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/settings/handlers/AccountSettingsHandler.ts b/src/settings/handlers/AccountSettingsHandler.ts index 70fe915d69..f03ad19963 100644 --- a/src/settings/handlers/AccountSettingsHandler.ts +++ b/src/settings/handlers/AccountSettingsHandler.ts @@ -116,23 +116,6 @@ export default class AccountSettingsHandler extends MatrixClientBackedSettingsHa 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") { const content = this.getSettings(ANALYTICS_EVENT_TYPE) || {}; // Check to make sure that we actually got a boolean