From 48cfd3f9da5b8200a902dad94e061666180e9fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 22 Dec 2020 09:29:35 +0100 Subject: [PATCH] Fixed some avatar stuff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/room_settings/RoomProfileSettings.js | 1 + src/components/views/settings/AvatarSetting.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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}