Split out avatar and display name hiding

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston 2017-11-13 12:58:10 -07:00
parent ffecb82bca
commit 63bebe9dfd
5 changed files with 23 additions and 7 deletions

View file

@ -29,7 +29,16 @@ export default class AccountSettingHandler extends SettingsHandler {
return !content['disable'];
}
return this._getSettings()[settingName];
let preferredValue = this._getSettings()[settingName];
if (preferredValue === null || preferredValue === undefined) {
// Honour the old setting on read only
if (settingName === "hideAvatarChanges" || settingName === "hideDisplaynameChanges") {
preferredValue = this._getSettings()["hideAvatarDisplaynameChanges"]
}
}
return preferredValue;
}
setValue(settingName, roomId, newValue) {