mirror of https://github.com/vector-im/riot-web
Merge pull request #3832 from matrix-org/jryans/community-user-list-fire
Repair community member info panelpull/21833/head
commit
dd652f6af3
|
@ -21,7 +21,9 @@ import DMRoomMap from './utils/DMRoomMap';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
avatarUrlForMember: function(member, width, height, resizeMethod) {
|
avatarUrlForMember: function(member, width, height, resizeMethod) {
|
||||||
let url = member.getAvatarUrl(
|
let url;
|
||||||
|
if (member && member.getAvatarUrl) {
|
||||||
|
url = member.getAvatarUrl(
|
||||||
MatrixClientPeg.get().getHomeserverUrl(),
|
MatrixClientPeg.get().getHomeserverUrl(),
|
||||||
Math.floor(width * window.devicePixelRatio),
|
Math.floor(width * window.devicePixelRatio),
|
||||||
Math.floor(height * window.devicePixelRatio),
|
Math.floor(height * window.devicePixelRatio),
|
||||||
|
@ -29,6 +31,7 @@ module.exports = {
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
if (!url) {
|
if (!url) {
|
||||||
// member can be null here currently since on invites, the JS SDK
|
// member can be null here currently since on invites, the JS SDK
|
||||||
// does not have enough info to build a RoomMember object for
|
// does not have enough info to build a RoomMember object for
|
||||||
|
|
|
@ -1299,7 +1299,7 @@ export default createReactClass({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const rightPanel = !RightPanelStore.getSharedInstance().isOpenForGroup
|
const rightPanel = RightPanelStore.getSharedInstance().isOpenForGroup
|
||||||
? <RightPanel groupId={this.props.groupId} />
|
? <RightPanel groupId={this.props.groupId} />
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ module.exports = createReactClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
_getState: function(props) {
|
_getState: function(props) {
|
||||||
if (props.member) {
|
if (props.member && props.member.name) {
|
||||||
return {
|
return {
|
||||||
name: props.member.name,
|
name: props.member.name,
|
||||||
title: props.title || props.member.userId,
|
title: props.title || props.member.userId,
|
||||||
|
|
|
@ -74,7 +74,7 @@ export default class HeaderButtons extends React.Component {
|
||||||
const rps = RightPanelStore.getSharedInstance();
|
const rps = RightPanelStore.getSharedInstance();
|
||||||
if (this.state.headerKind === HEADER_KIND_ROOM) {
|
if (this.state.headerKind === HEADER_KIND_ROOM) {
|
||||||
this.setState({phase: rps.visibleRoomPanelPhase});
|
this.setState({phase: rps.visibleRoomPanelPhase});
|
||||||
} else if (this.state.head === HEADER_KIND_GROUP) {
|
} else if (this.state.headerKind === HEADER_KIND_GROUP) {
|
||||||
this.setState({phase: rps.visibleGroupPanelPhase});
|
this.setState({phase: rps.visibleGroupPanelPhase});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue