purge a function

This commit is contained in:
Amaru8 2022-05-22 07:50:18 +02:00 committed by GitHub
parent a35d0d26f8
commit b9debc978f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,15 +47,12 @@
}, },
saveValue(newValue) { saveValue(newValue) {
newValue = Number(newValue); newValue = Number(newValue);
if (this.isAllowedRate(newValue)) { if (newValue >= 0.25 && newValue <= 2) {
newValue = String(newValue).length > 6 ? newValue.toFixed(2) : newValue; newValue = String(newValue).length > 6 ? newValue.toFixed(2) : newValue;
this.$root.mk.playbackRate = newValue; this.$root.mk.playbackRate = newValue;
this.$root.cfg.audio.playbackRate = newValue; this.$root.cfg.audio.playbackRate = newValue;
this.playbackRate = newValue; this.playbackRate = newValue;
} }
},
isAllowedRate(input) {
return input >= 0.25 && input <= 2 ? true : false;
} }
} }
}); });