Settings: Link notification sounds to playSound.

Fix: Restore hooks.ts patch, additionally use numbers.
This commit is contained in:
Paul
2021-06-24 14:26:18 +01:00
parent 352c0e880c
commit 8f62625506
10 changed files with 104 additions and 62 deletions

View File

@@ -1,14 +1,17 @@
import message from './message.mp3';
import outbound from './outbound.mp3';
import call_join from './call_join.mp3';
import call_leave from './call_leave.mp3';
const SoundMap: { [key in Sounds]: string } = {
message,
outbound,
call_join,
call_leave
}
export type Sounds = 'message' | 'call_join' | 'call_leave';
export type Sounds = 'message' | 'outbound' | 'call_join' | 'call_leave';
export const SOUNDS_ARRAY: Sounds[] = [ 'message', 'outbound', 'call_join', 'call_leave' ];
export function playSound(sound: Sounds) {
let file = SoundMap[sound];