mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
Settings: Link notification sounds to playSound.
Fix: Restore hooks.ts patch, additionally use numbers.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user