mirror of https://github.com/vector-im/riot-web
Merge pull request #2006 from matrix-org/t3chguy/notif_panel_fixes
notif panel fixespull/21833/head
commit
383dccebb4
|
@ -72,14 +72,12 @@ export default React.createClass({
|
||||||
|
|
||||||
_updateRelatedGroups() {
|
_updateRelatedGroups() {
|
||||||
if (this.unmounted) return;
|
if (this.unmounted) return;
|
||||||
const relatedGroupsEvent = this.context.matrixClient
|
const room = this.context.matrixClient.getRoom(this.props.mxEvent.getRoomId());
|
||||||
.getRoom(this.props.mxEvent.getRoomId())
|
if (!room) return;
|
||||||
.currentState
|
|
||||||
.getStateEvents('m.room.related_groups', '');
|
const relatedGroupsEvent = room.currentState.getStateEvents('m.room.related_groups', '');
|
||||||
this.setState({
|
this.setState({
|
||||||
relatedGroups: relatedGroupsEvent ?
|
relatedGroups: relatedGroupsEvent ? relatedGroupsEvent.getContent().groups || [] : [],
|
||||||
relatedGroupsEvent.getContent().groups || []
|
|
||||||
: [],
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -621,13 +621,14 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
|
|
||||||
switch (this.props.tileShape) {
|
switch (this.props.tileShape) {
|
||||||
case 'notif': {
|
case 'notif': {
|
||||||
|
const EmojiText = sdk.getComponent('elements.EmojiText');
|
||||||
const room = this.props.matrixClient.getRoom(this.props.mxEvent.getRoomId());
|
const room = this.props.matrixClient.getRoom(this.props.mxEvent.getRoomId());
|
||||||
return (
|
return (
|
||||||
<div className={classes}>
|
<div className={classes}>
|
||||||
<div className="mx_EventTile_roomName">
|
<div className="mx_EventTile_roomName">
|
||||||
<a href={permalink} onClick={this.onPermalinkClicked}>
|
<EmojiText element="a" href={permalink} onClick={this.onPermalinkClicked}>
|
||||||
{ room ? room.name : '' }
|
{ room ? room.name : '' }
|
||||||
</a>
|
</EmojiText>
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_EventTile_senderDetails">
|
<div className="mx_EventTile_senderDetails">
|
||||||
{ avatar }
|
{ avatar }
|
||||||
|
|
Loading…
Reference in New Issue