forked from Qortal/qortal-ui
scroll down when switching chat
This commit is contained in:
parent
f980196988
commit
3105fbde13
@ -876,6 +876,7 @@ class ChatPage extends LitElement {
|
||||
renderChatScroller() {
|
||||
return html`
|
||||
<chat-scroller
|
||||
chatId=${this.chatId}
|
||||
.messages=${this.messagesRendered}
|
||||
.escapeHTML=${escape}
|
||||
.getOldMessage=${this.getOldMessage}
|
||||
|
@ -33,7 +33,8 @@ class ChatScroller extends LitElement {
|
||||
showLastMessageRefScroller: { type: Function },
|
||||
emojiPicker: { attribute: false },
|
||||
isLoadingMessages: { type: Boolean},
|
||||
setIsLoadingMessages: {attribute: false}
|
||||
setIsLoadingMessages: {attribute: false},
|
||||
chatId: { type: String }
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,6 +113,9 @@ class ChatScroller extends LitElement {
|
||||
if(changedProperties.has('isLoadingMessages')){
|
||||
return true
|
||||
}
|
||||
if(changedProperties.has('chatId') && changedProperties.get('chatId')){
|
||||
return true
|
||||
}
|
||||
// Only update element if prop1 changed.
|
||||
return changedProperties.has('messages');
|
||||
}
|
||||
|
@ -330,7 +330,9 @@ class Chat extends LitElement {
|
||||
|
||||
}
|
||||
|
||||
setActiveChatHeadUrl(url){
|
||||
async setActiveChatHeadUrl(url){
|
||||
this.activeChatHeadUrl = ''
|
||||
await this.updateComplete;
|
||||
this.activeChatHeadUrl = url
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user