MessageView refactor: reply -> quote

This commit is contained in:
Scott Nonnenberg 2018-04-18 11:25:45 -07:00
parent d29162f3b6
commit e66f9faf33
No known key found for this signature in database
GPG key ID: 5F82280C35134661

View file

@ -258,8 +258,8 @@
if (this.timeStampView) {
this.timeStampView.remove();
}
if (this.replyView) {
this.replyView.remove();
if (this.quoteView) {
this.quoteView.remove();
}
// NOTE: We have to do this in the background (`then` instead of `await`)
@ -377,19 +377,19 @@
}
const contact = this.model.getQuoteContact();
if (this.replyView) {
this.replyView.remove();
this.replyView = null;
if (this.quoteView) {
this.quoteView.remove();
this.quoteView = null;
} else if (contact) {
this.listenTo(contact, 'change:color', this.renderQuote);
}
this.replyView = new Whisper.ReactWrapperView({
this.quoteView = new Whisper.ReactWrapperView({
className: 'quote-wrapper',
Component: window.Signal.Components.Quote,
props,
});
this.$('.inner-bubble').prepend(this.replyView.el);
this.$('.inner-bubble').prepend(this.quoteView.el);
},
isImageWithoutCaption() {
const attachments = this.model.get('attachments');