Null volume hotfix

This commit is contained in:
Santiago Fisela
2026-04-02 16:15:35 +03:00
committed by neoapps-dev
parent 785bd05d71
commit 188300c45c
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -232,16 +232,16 @@ const SettingsView = memo(function SettingsView() {
} else if (currentSubMenu === "audio") {
items.push({
id: "music",
label: `Music: ${musicVolume}%`,
label: `Music: ${musicVolume ?? 50}%`,
type: "slider",
value: musicVolume,
value: musicVolume ?? 50,
onChange: setMusicVolume,
});
items.push({
id: "sfx",
label: `SFX: ${sfxVolume}%`,
label: `SFX: ${sfxVolume ?? 100}%`,
type: "slider",
value: sfxVolume,
value: sfxVolume ?? 100,
onChange: setSfxVolume,
});
items.push({
+4 -4
View File
@@ -37,8 +37,8 @@ export function useAppConfig() {
if (config.vfxEnabled !== undefined) setVfxEnabled(config.vfxEnabled);
if (config.animationsEnabled !== undefined) setAnimationsEnabled(config.animationsEnabled);
if (config.rpcEnabled !== undefined) setRpcEnabled(config.rpcEnabled);
if (config.musicVol !== undefined) setMusicVol(config.musicVol);
if (config.sfxVol !== undefined) setSfxVol(config.sfxVol);
if (config.musicVol !== undefined && config.musicVol !== null) setMusicVol(config.musicVol);
if (config.sfxVol !== undefined && config.sfxVol !== null) setSfxVol(config.sfxVol);
if (config.legacyMode !== undefined) setLegacyMode(config.legacyMode);
setIsLoaded(true);
});
@@ -83,9 +83,9 @@ export function useAppConfig() {
setAnimationsEnabled,
rpcEnabled,
setRpcEnabled,
musicVol,
musicVol: musicVol ?? 50,
setMusicVol,
sfxVol,
sfxVol: sfxVol ?? 100,
setSfxVol,
isDayTime,
setIsDayTime,