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() {
|
renderChatScroller() {
|
||||||
return html`
|
return html`
|
||||||
<chat-scroller
|
<chat-scroller
|
||||||
|
chatId=${this.chatId}
|
||||||
.messages=${this.messagesRendered}
|
.messages=${this.messagesRendered}
|
||||||
.escapeHTML=${escape}
|
.escapeHTML=${escape}
|
||||||
.getOldMessage=${this.getOldMessage}
|
.getOldMessage=${this.getOldMessage}
|
||||||
|
@ -33,7 +33,8 @@ class ChatScroller extends LitElement {
|
|||||||
showLastMessageRefScroller: { type: Function },
|
showLastMessageRefScroller: { type: Function },
|
||||||
emojiPicker: { attribute: false },
|
emojiPicker: { attribute: false },
|
||||||
isLoadingMessages: { type: Boolean},
|
isLoadingMessages: { type: Boolean},
|
||||||
setIsLoadingMessages: {attribute: false}
|
setIsLoadingMessages: {attribute: false},
|
||||||
|
chatId: { type: String }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,6 +113,9 @@ class ChatScroller extends LitElement {
|
|||||||
if(changedProperties.has('isLoadingMessages')){
|
if(changedProperties.has('isLoadingMessages')){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if(changedProperties.has('chatId') && changedProperties.get('chatId')){
|
||||||
|
return true
|
||||||
|
}
|
||||||
// Only update element if prop1 changed.
|
// Only update element if prop1 changed.
|
||||||
return changedProperties.has('messages');
|
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
|
this.activeChatHeadUrl = url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user