mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
AudioService: preserve input value (fixes 0% volume after suspend... hopefully)
autoformat
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -142,8 +142,7 @@ Singleton {
|
||||
"path": "~/.config/Vencord",
|
||||
"requiresThemesFolder": false
|
||||
}]
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"id": "code",
|
||||
"name": "VSCode",
|
||||
"category": "applications",
|
||||
|
||||
Reference in New Issue
Block a user