Fix spacing in messages list; fix image message size on mobile; restore scrolling to chat screen when loading message.
This commit is contained in:
parent
97509c47ca
commit
5943621dbf
3 changed files with 9 additions and 1 deletions
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
@ -1032,6 +1033,10 @@ li {
|
||||||
.message-group {
|
.message-group {
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.message-group.image {
|
||||||
|
max-width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
.message-image-attachement {
|
.message-image-attachement {
|
||||||
max-height: 20em;
|
max-height: 20em;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue