diff --git a/src/components/views/room_settings/RoomProfileSettings.js b/src/components/views/room_settings/RoomProfileSettings.js index f08860d52b..ccbe8e288a 100644 --- a/src/components/views/room_settings/RoomProfileSettings.js +++ b/src/components/views/room_settings/RoomProfileSettings.js @@ -62,6 +62,7 @@ export default class RoomProfileSettings extends React.Component { } _uploadAvatar = () => { + if (!this.state.canSetAvatar) return; this._avatarUpload.current.click(); }; diff --git a/src/components/views/settings/AvatarSetting.js b/src/components/views/settings/AvatarSetting.js index 487c752c38..93b982467a 100644 --- a/src/components/views/settings/AvatarSetting.js +++ b/src/components/views/settings/AvatarSetting.js @@ -65,7 +65,7 @@ const AvatarSetting = ({avatarUrl, avatarAltText, avatarName, uploadAvatar, remo const avatarClasses = classNames({ "mx_AvatarSetting_avatar": true, - "mx_AvatarSetting_avatar_hovering": isHovering, + "mx_AvatarSetting_avatar_hovering": isHovering && uploadAvatar, }); return
{avatarElement}