The force.

This commit is contained in:
retoor 2025-05-23 03:01:20 +02:00
parent 431748c489
commit a55d15b635
2 changed files with 15 additions and 4 deletions

View File

@ -47,8 +47,12 @@ class ChatInputComponent extends HTMLElement {
this.textarea.focus();
}
async connectedCallback() {
this.user = await app.rpc.getUser(null);
this.user = null
app.rpc.getUser(null).then((user) => {
this.user=user
})
this.liveType = this.getAttribute("live-type") === "true";
this.liveTypeInterval =
parseInt(this.getAttribute("live-type-interval")) || 3;
@ -152,6 +156,9 @@ class ChatInputComponent extends HTMLElement {
});
app.rpc.sendMessage(this.channelUid, message);
});
setTimeout(()=>{
this.focus();
},1000)
}
trackSecondsBetweenEvents(event1Time, event2Time) {

View File

@ -19,10 +19,14 @@ class MessageList extends HTMLElement {
this.items = [];
}
scrollToBottom(force) {
console.info("Scrolling down")
// if (force) {
this.scrollTop = this.scrollHeight;
//this.querySelector(".message-list-bottom").scrollIntoView();
//this.scrollTop = this.scrollHeight;
this.querySelector(".message-list-bottom").scrollIntoView();
setTimeout(() => {
this.querySelector(".message-list-bottom").scrollIntoView();
},200)
// }
}
updateMessageText(uid, message) {