mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
MessageView: Add id from database to DOM for outgoing messages (#2350)
This commit is contained in:
parent
b41cf47df6
commit
b6a585a646
|
@ -313,6 +313,7 @@
|
|||
onChange() {
|
||||
this.renderSent();
|
||||
this.renderQuote();
|
||||
this.addId();
|
||||
},
|
||||
select(e) {
|
||||
this.$el.trigger('select', { message: this.model });
|
||||
|
@ -470,6 +471,13 @@
|
|||
|
||||
return body || isGroupUpdate || isEndSession || errorsCanBeContents;
|
||||
},
|
||||
addId() {
|
||||
// Because we initially render a sent Message before we've roundtripped with the
|
||||
// database, we don't have its id for that first render. We do get a change event,
|
||||
// however, and can add the id manually.
|
||||
const { id } = this.model;
|
||||
this.$el.attr('id', id);
|
||||
},
|
||||
render() {
|
||||
const contact = this.model.isIncoming() ? this.model.getContact() : null;
|
||||
const attachments = this.model.get('attachments');
|
||||
|
|
Loading…
Reference in a new issue