Why not change it everywhere while we're at it
Signed-off-by: Aaron Raimist <aaron@raim.ist>pull/21833/head
parent
4b3c865959
commit
cb033bcadd
|
@ -678,8 +678,8 @@ module.exports = React.createClass({
|
|||
if (!room) return;
|
||||
|
||||
console.log("Tinter.tint from updateTint");
|
||||
const color_scheme = SettingsStore.getValue("roomColor", room.roomId);
|
||||
Tinter.tint(color_scheme.primary_color, color_scheme.secondary_color);
|
||||
const colorScheme = SettingsStore.getValue("roomColor", room.roomId);
|
||||
Tinter.tint(colorScheme.primary_color, colorScheme.secondary_color);
|
||||
},
|
||||
|
||||
onAccountData: function(event) {
|
||||
|
@ -693,11 +693,11 @@ module.exports = React.createClass({
|
|||
onRoomAccountData: function(event, room) {
|
||||
if (room.roomId == this.state.roomId) {
|
||||
const type = event.getType();
|
||||
if (type === "org.matrix.room.color_scheme") {
|
||||
const color_scheme = event.getContent();
|
||||
if (type === "org.matrix.room.colorScheme") {
|
||||
const colorScheme = event.getContent();
|
||||
// XXX: we should validate the event
|
||||
console.log("Tinter.tint from onRoomAccountData");
|
||||
Tinter.tint(color_scheme.primary_color, color_scheme.secondary_color);
|
||||
Tinter.tint(colorScheme.primary_color, colorScheme.secondary_color);
|
||||
} else if (type === "org.matrix.room.preview_urls" || type === "im.vector.web.settings") {
|
||||
// non-e2ee url previews are stored in legacy event type `org.matrix.room.preview_urls`
|
||||
this._updatePreviewUrlVisibility(room);
|
||||
|
|
|
@ -36,7 +36,7 @@ export default class RoomAccountSettingsHandler extends SettingsHandler {
|
|||
// The event content should already be in an appropriate format, we just need
|
||||
// to get the right value.
|
||||
// don't fallback to {} because thats truthy and would imply there is an event specifying tint
|
||||
return this._getSettings(roomId, "org.matrix.room.color_scheme");
|
||||
return this._getSettings(roomId, "org.matrix.room.colorScheme");
|
||||
}
|
||||
|
||||
const settings = this._getSettings(roomId) || {};
|
||||
|
@ -54,7 +54,7 @@ export default class RoomAccountSettingsHandler extends SettingsHandler {
|
|||
// Special case room color
|
||||
if (settingName === "roomColor") {
|
||||
// The new value should match our requirements, we just need to store it in the right place.
|
||||
return MatrixClientPeg.get().setRoomAccountData(roomId, "org.matrix.room.color_scheme", newValue);
|
||||
return MatrixClientPeg.get().setRoomAccountData(roomId, "org.matrix.room.colorScheme", newValue);
|
||||
}
|
||||
|
||||
const content = this._getSettings(roomId) || {};
|
||||
|
|
Loading…
Reference in New Issue