Disable clicking on room icon in a better way

Signed-off-by: Aaron Raimist <aaron@raim.ist>
pull/21833/head
Aaron Raimist 2019-01-29 16:05:38 -06:00
parent 53947bee35
commit 52ebba9d3e
No known key found for this signature in database
GPG Key ID: 37419210002890EF
1 changed files with 2 additions and 6 deletions

View File

@ -137,11 +137,6 @@ module.exports = React.createClass({
const avatarUrl = this.props.room.getAvatarUrl( const avatarUrl = this.props.room.getAvatarUrl(
MatrixClientPeg.get().getHomeserverUrl(), MatrixClientPeg.get().getHomeserverUrl(),
null, null, null, false); null, null, null, false);
if (!avatarUrl) {
return;
}
const ImageView = sdk.getComponent("elements.ImageView"); const ImageView = sdk.getComponent("elements.ImageView");
const params = { const params = {
src: avatarUrl, src: avatarUrl,
@ -163,7 +158,8 @@ module.exports = React.createClass({
<BaseAvatar {...otherProps} name={roomName} <BaseAvatar {...otherProps} name={roomName}
idName={room ? room.roomId : null} idName={room ? room.roomId : null}
urls={this.state.urls} urls={this.state.urls}
onClick={this.props.viewAvatarOnClick ? this.onRoomAvatarClick : null} /> onClick={this.props.viewAvatarOnClick ? this.onRoomAvatarClick : null}
disabled={!this.state.urls[0]} />
); );
}, },
}); });