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:
@@ -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' ],
|
||||
|
Reference in New Issue
Block a user