Frontend for timer updates and timer indicator

This commit is contained in:
lilia 2016-09-28 16:47:57 -07:00
parent 448835e4d5
commit 2b2c6ab040
10 changed files with 242 additions and 26 deletions

View file

@ -48,14 +48,16 @@
className: 'expirationTimerUpdate advisory',
templateName: 'expirationTimerUpdate',
initialize: function() {
this.conversation = this.model.getModelForExpirationTimerUpdate();
this.conversation = this.model.getContact();
this.listenTo(this.conversation, 'change', this.render);
},
render_attributes: function() {
var seconds = this.model.get('expirationTimerUpdate').expireTimer;
return {
content: i18n('changedTheTimer',
this.conversation.getTitle(),
this.model.get('timerUpdate').time)
content: i18n('changedTheTimer', [
this.conversation.getTitle(),
Whisper.ExpirationTimerOptions.getName(seconds)
])
};
}
});