mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
reduce message re-renders
This commit is contained in:
parent
3ef035249b
commit
0b613beed6
@ -684,7 +684,7 @@ class ChatScroller extends LitElement {
|
||||
<div id="upObserver"></div>
|
||||
${repeat(
|
||||
formattedMessages,
|
||||
(formattedMessage) => formattedMessage.id, // Use .id as the unique key for formattedMessage.
|
||||
(formattedMessage) => formattedMessage.reference, // Use .id as the unique key for formattedMessage.
|
||||
(formattedMessage) => html`
|
||||
|
||||
${repeat(
|
||||
@ -1004,7 +1004,8 @@ class MessageTemplate extends LitElement {
|
||||
listSeenMessages: { type: Array },
|
||||
addSeenMessage: { attribute: false },
|
||||
chatId: { type: String },
|
||||
isInProgress: {type: Boolean}
|
||||
isInProgress: {type: Boolean},
|
||||
id: {type: String}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1113,6 +1114,13 @@ class MessageTemplate extends LitElement {
|
||||
}, 60000)
|
||||
}
|
||||
|
||||
shouldUpdate(changedProperties){
|
||||
if (changedProperties.has('messageObj')) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
clearConsole() {
|
||||
if (!isElectron()) {
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user