Fix performance issue for quote rendering
This commit is contained in:
parent
bbd611b189
commit
d605daa04f
1 changed files with 6 additions and 3 deletions
|
@ -3620,9 +3620,6 @@ Whisper.ConversationView = Whisper.View.extend({
|
||||||
const props = message.getPropsForQuote();
|
const props = message.getPropsForQuote();
|
||||||
|
|
||||||
const contact = this.quotedMessage.getContact();
|
const contact = this.quotedMessage.getContact();
|
||||||
if (contact) {
|
|
||||||
this.listenTo(contact, 'change', this.renderQuotedMesage);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.quoteView = new Whisper.ReactWrapperView({
|
this.quoteView = new Whisper.ReactWrapperView({
|
||||||
className: 'quote-wrapper',
|
className: 'quote-wrapper',
|
||||||
|
@ -3640,6 +3637,12 @@ Whisper.ConversationView = Whisper.View.extend({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (contact) {
|
||||||
|
this.quoteView.listenTo(contact, 'change', () => {
|
||||||
|
this.renderQuotedMessage();
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
showInvalidMessageToast(messageText?: string): boolean {
|
showInvalidMessageToast(messageText?: string): boolean {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue