Minor styling and avatar bug fixing

This commit is contained in:
Travis Ralston 2019-01-28 11:34:21 -07:00
parent 9a524c49b1
commit ea1d6a0146
3 changed files with 7 additions and 2 deletions

View file

@ -17,3 +17,7 @@ limitations under the License.
.mx_GeneralRoomSettingsTab_profileSection {
margin-top: 10px;
}
.mx_GeneralRoomSettingsTab .mx_AliasSettings .mx_Field select {
width: 100%;
}

View file

@ -279,7 +279,7 @@ module.exports = React.createClass({
}
return (
<div>
<div className='mx_AliasSettings'>
{canonical_alias_section}
<EditableItemList
className={"mx_RoomSettings_localAliases"}

View file

@ -34,7 +34,8 @@ export default class RoomProfileSettings extends React.Component {
const client = MatrixClientPeg.get();
const room = client.getRoom(props.roomId);
if (!room) throw new Error("Expected a room for ID: ", props.roomId);
let avatarUrl = room.avatarUrl;
const avatarEvent = room.currentState.getStateEvents("m.room.avatar", "");
let avatarUrl = avatarEvent && avatarEvent.getContent() ? avatarEvent.getContent()["url"] : null;
if (avatarUrl) avatarUrl = client.mxcUrlToHttp(avatarUrl, 96, 96, 'crop', false);
const topicEvent = room.currentState.getStateEvents("m.room.topic", "");
const topic = topicEvent && topicEvent.getContent() ? topicEvent.getContent()['topic'] : null;