Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Remove autoplayGifsAndVideos workaround #7852

Merged
merged 1 commit into from
Feb 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/settings/handlers/AccountSettingsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down