Skip to content

Commit a9c1dba

Browse files
committed
feat: do not load assets if playing sounds is disabled in the settings
1 parent 42fb034 commit a9c1dba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/keybr-textinput-sounds/lib/player.ts

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ export function makeSoundPlayer(settings: Settings) {
1818
const playSounds = settings.get(soundProps.playSounds);
1919
const soundVolume = settings.get(soundProps.soundVolume);
2020
const soundTheme = settings.get(soundProps.soundTheme);
21+
if (playSounds === PlaySounds.None) {
22+
return () => {};
23+
}
2124
const theme = loadTheme(soundTheme);
2225
return (feedback: Feedback) => {
2326
if (playSounds === PlaySounds.All) {

0 commit comments

Comments
 (0)