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") { } else if (currentSubMenu === "audio") {
items.push({ items.push({
id: "music", id: "music",
label: `Music: ${musicVolume}%`, label: `Music: ${musicVolume ?? 50}%`,
type: "slider", type: "slider",
value: musicVolume, value: musicVolume ?? 50,
onChange: setMusicVolume, onChange: setMusicVolume,
}); });
items.push({ items.push({
id: "sfx", id: "sfx",
label: `SFX: ${sfxVolume}%`, label: `SFX: ${sfxVolume ?? 100}%`,
type: "slider", type: "slider",
value: sfxVolume, value: sfxVolume ?? 100,
onChange: setSfxVolume, onChange: setSfxVolume,
}); });
items.push({ items.push({
+4 -4
View File
@@ -37,8 +37,8 @@ export function useAppConfig() {
if (config.vfxEnabled !== undefined) setVfxEnabled(config.vfxEnabled); if (config.vfxEnabled !== undefined) setVfxEnabled(config.vfxEnabled);
if (config.animationsEnabled !== undefined) setAnimationsEnabled(config.animationsEnabled); if (config.animationsEnabled !== undefined) setAnimationsEnabled(config.animationsEnabled);
if (config.rpcEnabled !== undefined) setRpcEnabled(config.rpcEnabled); if (config.rpcEnabled !== undefined) setRpcEnabled(config.rpcEnabled);
if (config.musicVol !== undefined) setMusicVol(config.musicVol); if (config.musicVol !== undefined && config.musicVol !== null) setMusicVol(config.musicVol);
if (config.sfxVol !== undefined) setSfxVol(config.sfxVol); if (config.sfxVol !== undefined && config.sfxVol !== null) setSfxVol(config.sfxVol);
if (config.legacyMode !== undefined) setLegacyMode(config.legacyMode); if (config.legacyMode !== undefined) setLegacyMode(config.legacyMode);
setIsLoaded(true); setIsLoaded(true);
}); });
@@ -83,9 +83,9 @@ export function useAppConfig() {
setAnimationsEnabled, setAnimationsEnabled,
rpcEnabled, rpcEnabled,
setRpcEnabled, setRpcEnabled,
musicVol, musicVol: musicVol ?? 50,
setMusicVol, setMusicVol,
sfxVol, sfxVol: sfxVol ?? 100,
setSfxVol, setSfxVol,
isDayTime, isDayTime,
setIsDayTime, setIsDayTime,