diff --git a/web/src/app.ts b/web/src/app.ts index cdf0242..1a704de 100644 --- a/web/src/app.ts +++ b/web/src/app.ts @@ -335,6 +335,10 @@ async function handleIncomingMessage(msg: Message) { async function selectChat(chat: Chat, isPopState = false, smoothScroll = true) { if (isLoadingChat) return; + const pageEl = document.getElementById("chat-page"); + if (!pageEl) return; + mainView?.scrollTo(pageEl); + isLoadingChat = true; setActiveChatState(chat); diff --git a/web/src/ui.ts b/web/src/ui.ts index 50c0b07..82b6c2c 100644 --- a/web/src/ui.ts +++ b/web/src/ui.ts @@ -338,7 +338,6 @@ export const ui = { .input; textEl.innerHTML = parsed; - console.log(msg); contentEl.appendChild(textEl); bubble.appendChild(contentEl); diff --git a/web/style.css b/web/style.css index f800ca5..2772706 100644 --- a/web/style.css +++ b/web/style.css @@ -363,6 +363,7 @@ li { cursor: pointer; transition: all 0.2s ease; border: 1px solid transparent; + margin-left: 0px; } .chat-item.selected { @@ -1032,6 +1033,10 @@ li { .message-group { max-width: 90%; } + + .message-group.image { + max-width: 60%; + } .message-image-attachement { max-height: 20em;