diff --git a/src/platform/web/ui/avatar.js b/src/platform/web/ui/avatar.js index bda44db0..36d9b172 100644 --- a/src/platform/web/ui/avatar.js +++ b/src/platform/web/ui/avatar.js @@ -25,8 +25,7 @@ export function renderStaticAvatar(vm, size, extraClasses = undefined) { let avatarClasses = classNames({ avatar: true, [`size-${size}`]: true, - [`usercolor${vm.avatarColorNumber}`]: true, - ['has-image']: true + [`usercolor${vm.avatarColorNumber}`]: true }); if (extraClasses) { avatarClasses += ` ${extraClasses}`; @@ -50,7 +49,5 @@ export function handleAvatarError(e) { if (!isAvatarEvent(e)) { return; } const parent = e.target.parentElement; const avatarLetter = parent.getAttribute("data-avatar-letter"); - const letterNode = document.createTextNode(avatarLetter); - parent.appendChild(letterNode); - parent.classList.remove("has-image"); + parent.textContent = avatarLetter; } diff --git a/src/platform/web/ui/css/avatar.css b/src/platform/web/ui/css/avatar.css index 85d370b7..d369f85f 100644 --- a/src/platform/web/ui/css/avatar.css +++ b/src/platform/web/ui/css/avatar.css @@ -31,10 +31,6 @@ limitations under the License. speak: none; } -.hydrogen .avatar:not(.has-image) img{ - display: none; -} - .hydrogen .avatar img { width: 100%; height: 100%;