fix chat view

This commit is contained in:
amazuecos
2025-04-02 22:24:32 +02:00
parent 69f6d6cbeb
commit 9cbbddcc1c
11 changed files with 62 additions and 54 deletions

View File

@ -68,12 +68,16 @@ class Chat {
}
if (this.chatHistoryBody[0]) {
console.log("History body");
this.scrollbarChatHistory = new PerfectScrollbar(this.chatHistoryBody[0], {
wheelPropagation: false,
suppressScrollX: true,
});
}
if (this.chatHistoryBody.length) {
this.chatHistoryBody.scrollTop(0,this.chatHistoryBody[0].scrollHeight);
}
}
initDirectMessage() {
@ -148,7 +152,7 @@ class Chat {
this._handleGetChatList()
this.sendBtnMessageDepartment.on("click", this._sendMessage.bind(this))
this.sendBtnMessageDepartmentClient.on("click", this._sendMessage.bind(this))
this.scrollbarChatHistory.update()
this.messageInput.on("keypress", this._sendMessagePressKey.bind(this))
this.initSelectClient()
// setInterval(this._getChatMessage.bind(this), 10000)