Set expireTimer to null to unset
// FREEBIE
This commit is contained in:
parent
0fac2e1d68
commit
6509646bdb
3 changed files with 5 additions and 2 deletions
|
@ -199,6 +199,7 @@
|
|||
},
|
||||
|
||||
updateExpirationTimer: function(expireTimer, source, received_at) {
|
||||
if (!expireTimer) { expireTimer = null; }
|
||||
source = source || textsecure.storage.user.getNumber();
|
||||
var timestamp = received_at || Date.now();
|
||||
this.save({ expireTimer: expireTimer });
|
||||
|
|
|
@ -424,7 +424,7 @@
|
|||
message.get('received_at'));
|
||||
}
|
||||
} else if (conversation.get('expireTimer')) {
|
||||
conversation.updateExpirationTimer(0, source,
|
||||
conversation.updateExpirationTimer(null, source,
|
||||
message.get('received_at'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,8 +32,10 @@
|
|||
},
|
||||
setTimer: function(e) {
|
||||
var seconds = this.$(e.target).data().seconds;
|
||||
if (seconds >= 0) {
|
||||
if (seconds > 0) {
|
||||
this.model.updateExpirationTimer(seconds);
|
||||
} else {
|
||||
this.model.updateExpirationTimer(null);
|
||||
}
|
||||
},
|
||||
render: function() {
|
||||
|
|
Loading…
Reference in a new issue