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() {
|
isExpiring: function() {
|
||||||
return this.get('expireTimer') && this.get('expirationStartTimestamp');
|
return this.get('expireTimer') && this.get('expirationStartTimestamp');
|
||||||
},
|
},
|
||||||
|
isExpired: function() {
|
||||||
|
return this.msTilExpire() <= 0;
|
||||||
|
},
|
||||||
msTilExpire: function() {
|
msTilExpire: function() {
|
||||||
if (!this.isExpiring()) {
|
if (!this.isExpiring()) {
|
||||||
return Infinity;
|
return Infinity;
|
||||||
|
|
|
@ -36,6 +36,9 @@
|
||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
this.timeout = null;
|
this.timeout = null;
|
||||||
}
|
}
|
||||||
|
if (this.model.isExpired()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
if (this.model.isExpiring()) {
|
if (this.model.isExpiring()) {
|
||||||
this.render();
|
this.render();
|
||||||
var totalTime = this.model.get('expireTimer') * 1000;
|
var totalTime = this.model.get('expireTimer') * 1000;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue