Support sounds

This commit is contained in:
Philipp Heckel 2022-03-06 00:02:27 -05:00
parent 09b128f27a
commit dc7ca6e405
13 changed files with 73 additions and 16 deletions

View file

@ -1,13 +1,13 @@
import db from "./db";
class Prefs {
async setSelectedSubscriptionId(selectedSubscriptionId) {
db.prefs.put({key: 'selectedSubscriptionId', value: selectedSubscriptionId});
async setSound(sound) {
db.prefs.put({key: 'sound', value: sound.toString()});
}
async selectedSubscriptionId() {
const selectedSubscriptionId = await db.prefs.get('selectedSubscriptionId');
return (selectedSubscriptionId) ? selectedSubscriptionId.value : "";
async sound() {
const sound = await db.prefs.get('sound');
return (sound) ? sound.value : "mixkit-correct-answer-tone";
}
async setMinPriority(minPriority) {