AudioService: preserve input value (fixes 0% volume after suspend... hopefully)

autoformat
This commit is contained in:
Ly-sec
2025-11-14 13:27:54 +01:00
parent 68e83f4d63
commit 4088c13eec
3 changed files with 6 additions and 7 deletions
+4 -4
View File
@@ -53,12 +53,12 @@ Singleton {
var vol = source.audio.volume
if (vol !== undefined && !isNaN(vol)) {
root._inputVolume = vol
} else {
root._inputVolume = 0
}
// Don't reset to 0 if volume is undefined/NaN - preserve last known value
root._inputMuted = !!source.audio.muted
} else {
root._inputVolume = 0
// Don't reset volume to 0 when source is unavailable - preserve last known value
// Only reset muted state
root._inputMuted = true
}
}
@@ -102,7 +102,7 @@ Singleton {
function onVolumeChanged() {
var vol = source?.audio?.volume
if (vol === undefined || isNaN(vol)) {
root._inputVolume = 0
// Don't reset to 0 if volume is undefined/NaN - preserve last known value
return
}
// Only update if the value actually changed to prevent spurious signals
+1 -1
View File
@@ -235,7 +235,7 @@ Singleton {
const templatePath = `${Quickshell.shellDir}/Assets/MatugenTemplates/${codeApp.input}`
const outputPath = client.path.replace("~", homeDir)
const outputDir = outputPath.substring(0, outputPath.lastIndexOf('/'))
// Extract base config directory for checking
var baseConfigDir = ""
if (client.name === "code") {
+1 -2
View File
@@ -142,8 +142,7 @@ Singleton {
"path": "~/.config/Vencord",
"requiresThemesFolder": false
}]
},
{
}, {
"id": "code",
"name": "VSCode",
"category": "applications",