TimerView: don't continue to update after expiration
FREEBIE
This commit is contained in:
parent
0c2c36c11a
commit
fb7e7cf34c
2 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue