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:
parent
7e06e014c4
commit
4230b11f82
1 changed files with 6 additions and 0 deletions
|
@ -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' ],
|
||||
|
|
Loading…
Reference in a new issue