mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
Merge pull request #3834 from matrix-org/dbkr/community-user-list-fire_rel
Repair community member info panel
This commit is contained in:
commit
280253d58a
4 changed files with 14 additions and 11 deletions
|
@ -21,14 +21,17 @@ import DMRoomMap from './utils/DMRoomMap';
|
|||
|
||||
module.exports = {
|
||||
avatarUrlForMember: function(member, width, height, resizeMethod) {
|
||||
let url = member.getAvatarUrl(
|
||||
MatrixClientPeg.get().getHomeserverUrl(),
|
||||
Math.floor(width * window.devicePixelRatio),
|
||||
Math.floor(height * window.devicePixelRatio),
|
||||
resizeMethod,
|
||||
false,
|
||||
false,
|
||||
);
|
||||
let url;
|
||||
if (member && member.getAvatarUrl) {
|
||||
url = member.getAvatarUrl(
|
||||
MatrixClientPeg.get().getHomeserverUrl(),
|
||||
Math.floor(width * window.devicePixelRatio),
|
||||
Math.floor(height * window.devicePixelRatio),
|
||||
resizeMethod,
|
||||
false,
|
||||
false,
|
||||
);
|
||||
}
|
||||
if (!url) {
|
||||
// member can be null here currently since on invites, the JS SDK
|
||||
// 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} />
|
||||
: undefined;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ module.exports = createReactClass({
|
|||
},
|
||||
|
||||
_getState: function(props) {
|
||||
if (props.member) {
|
||||
if (props.member && props.member.name) {
|
||||
return {
|
||||
name: props.member.name,
|
||||
title: props.title || props.member.userId,
|
||||
|
|
|
@ -74,7 +74,7 @@ export default class HeaderButtons extends React.Component {
|
|||
const rps = RightPanelStore.getSharedInstance();
|
||||
if (this.state.headerKind === HEADER_KIND_ROOM) {
|
||||
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});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue