Support future compatibility for new timer options

If some future client ever sends us an arbitrary timer value which we do
not currently support, present it as a duration in seconds in timer
update messages and ui, where we would otherwise have rendered nothing,
e.g., "You set the timer to ."

// FREEBIE
This commit is contained in:
lilia 2017-02-06 18:22:09 -08:00
parent 7e06e014c4
commit 4230b11f82

View file

@ -32,6 +32,9 @@
}
var o = this.findWhere({seconds: seconds});
if (o) { return o.getName(); }
else {
return [seconds, 'seconds'].join(' ');
}
},
getAbbreviated: function(seconds) {
if (!seconds) {
@ -39,6 +42,9 @@
}
var o = this.findWhere({seconds: seconds});
if (o) { return o.getAbbreviated(); }
else {
return [seconds, 's'].join('');
}
}
}))([
[ 0, 'seconds' ],