Remove layout workaround (#7853)

This commit is contained in:
Šimon Brandner 2022-02-21 11:05:01 +01:00 committed by GitHub
parent 9aa77f3417
commit eca64d776a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,6 @@ import SettingsHandler from "./SettingsHandler";
import { MatrixClientPeg } from "../../MatrixClientPeg"; import { MatrixClientPeg } from "../../MatrixClientPeg";
import { SettingLevel } from "../SettingLevel"; import { SettingLevel } from "../SettingLevel";
import { CallbackFn, WatchManager } from "../WatchManager"; import { CallbackFn, WatchManager } from "../WatchManager";
import { Layout } from "../enums/Layout";
/** /**
* Gets and sets settings at the "device" level for the current device. * Gets and sets settings at the "device" level for the current device.
@ -57,19 +56,6 @@ export default class DeviceSettingsHandler extends SettingsHandler {
return null; // wrong type or otherwise not set return null; // wrong type or otherwise not set
} }
// Special case for old useIRCLayout setting
if (settingName === "layout") {
const settings = this.getSettings() || {};
if (settings["useIRCLayout"]) {
// Set the new layout setting and delete the old one so that we
// can delete this block of code after some time
settings["layout"] = Layout.IRC;
delete settings["useIRCLayout"];
localStorage.setItem("mx_local_settings", JSON.stringify(settings));
}
return settings[settingName];
}
const settings = this.getSettings() || {}; const settings = this.getSettings() || {};
return settings[settingName]; return settings[settingName];
} }