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 contact = this.quotedMessage.getContact();
|
||||
if (contact) {
|
||||
this.listenTo(contact, 'change', this.renderQuotedMesage);
|
||||
}
|
||||
|
||||
this.quoteView = new Whisper.ReactWrapperView({
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue