Ensure timer updates show in convo before initiating message

This commit is contained in:
Scott Nonnenberg 2018-06-08 15:51:00 -07:00
parent 7cebeb20f5
commit dfa1f0797c
2 changed files with 16 additions and 2 deletions

View file

@ -94,6 +94,7 @@
this.conversation = this.model.getExpirationTimerUpdateSource();
this.listenTo(this.conversation, 'change', this.render);
this.listenTo(this.model, 'unload', this.remove);
this.listenTo(this.model, 'change', this.onChange);
},
render_attributes() {
const seconds = this.model.get('expirationTimerUpdate').expireTimer;
@ -114,6 +115,13 @@
}
return { content: timerMessage };
},
onChange() {
this.addId();
},
addId() {
// This is important to enable the lastSeenIndicator when it's just been added.
this.$el.attr('id', this.id());
},
});
Whisper.KeyChangeView = Whisper.View.extend({