Fix spacing in messages list; fix image message size on mobile; restore scrolling to chat screen when loading message.

This commit is contained in:
天クマ 2026-08-17 17:05:28 -03:00
commit 5943621dbf
3 changed files with 9 additions and 1 deletions

View file

@ -335,6 +335,10 @@ async function handleIncomingMessage(msg: Message) {
async function selectChat(chat: Chat, isPopState = false, smoothScroll = true) { async function selectChat(chat: Chat, isPopState = false, smoothScroll = true) {
if (isLoadingChat) return; if (isLoadingChat) return;
const pageEl = document.getElementById("chat-page");
if (!pageEl) return;
mainView?.scrollTo(pageEl);
isLoadingChat = true; isLoadingChat = true;
setActiveChatState(chat); setActiveChatState(chat);

View file

@ -338,7 +338,6 @@ export const ui = {
.input; .input;
textEl.innerHTML = parsed; textEl.innerHTML = parsed;
console.log(msg);
contentEl.appendChild(textEl); contentEl.appendChild(textEl);
bubble.appendChild(contentEl); bubble.appendChild(contentEl);

View file

@ -363,6 +363,7 @@ li {
cursor: pointer; cursor: pointer;
transition: all 0.2s ease; transition: all 0.2s ease;
border: 1px solid transparent; border: 1px solid transparent;
margin-left: 0px;
} }
.chat-item.selected { .chat-item.selected {
@ -1033,6 +1034,10 @@ li {
max-width: 90%; max-width: 90%;
} }
.message-group.image {
max-width: 60%;
}
.message-image-attachement { .message-image-attachement {
max-height: 20em; max-height: 20em;
} }