TimerView: don't continue to update after expiration

FREEBIE
pull/749/head
Scott Nonnenberg 8 years ago
parent 0c2c36c11a
commit fb7e7cf34c

@ -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…
Cancel
Save