mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
Set the new layout setting when reading it
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
32ad94bce5
commit
a8b86da058
1 changed files with 7 additions and 1 deletions
|
@ -71,7 +71,13 @@ export default class DeviceSettingsHandler extends SettingsHandler {
|
|||
// Special case for old useIRCLayout setting
|
||||
if (settingName === "layout") {
|
||||
const settings = this.getSettings() || {};
|
||||
if (settings["useIRCLayout"]) return Layout.IRC;
|
||||
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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue