From 57288f75b07920b560dfaabe69ecc056461178b2 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 31 May 2021 13:03:41 +0200 Subject: [PATCH] add avatar & sender as first element in message so they don't occlude --- src/platform/web/ui/session/room/timeline/BaseMessageView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/web/ui/session/room/timeline/BaseMessageView.js b/src/platform/web/ui/session/room/timeline/BaseMessageView.js index caf9e961..f15709aa 100644 --- a/src/platform/web/ui/session/room/timeline/BaseMessageView.js +++ b/src/platform/web/ui/session/room/timeline/BaseMessageView.js @@ -49,8 +49,8 @@ export class BaseMessageView extends TemplateView { li.removeChild(li.querySelector(".Timeline_messageAvatar")); li.removeChild(li.querySelector(".Timeline_messageSender")); } else if (!isContinuation) { - li.appendChild(renderStaticAvatar(vm, 30, "Timeline_messageAvatar")); - li.appendChild(tag.div({className: `Timeline_messageSender usercolor${vm.avatarColorNumber}`}, vm.displayName)); + li.insertBefore(renderStaticAvatar(vm, 30, "Timeline_messageAvatar"), li.firstChild); + li.insertBefore(tag.div({className: `Timeline_messageSender usercolor${vm.avatarColorNumber}`}, vm.displayName), li.firstChild); } }); return li;