mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
TimerView: don't continue to update after expiration
FREEBIE
This commit is contained in:
@@ -508,6 +508,9 @@
|
||||
isExpiring: function() {
|
||||
return this.get('expireTimer') && this.get('expirationStartTimestamp');
|
||||
},
|
||||
isExpired: function() {
|
||||
return this.msTilExpire() <= 0;
|
||||
},
|
||||
msTilExpire: function() {
|
||||
if (!this.isExpiring()) {
|
||||
return Infinity;
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
clearTimeout(this.timeout);
|
||||
this.timeout = null;
|
||||
}
|
||||
if (this.model.isExpired()) {
|
||||
return this;
|
||||
}
|
||||
if (this.model.isExpiring()) {
|
||||
this.render();
|
||||
var totalTime = this.model.get('expireTimer') * 1000;
|
||||
|
||||
Reference in New Issue
Block a user