1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-15 09:52:50 -05:00

fix: Privacy audio null property

This commit is contained in:
purian23
2025-10-20 21:02:33 -04:00
parent 7bf73ab14d
commit 507b516f89

View File

@@ -60,7 +60,8 @@ Rectangle {
DankIcon { DankIcon {
name: { name: {
let muted = AudioService.source.audio.muted || AudioService.source.audio.volume === 0.0 const sourceAudio = AudioService.source?.audio
const muted = !sourceAudio || sourceAudio.muted || sourceAudio.volume === 0.0
if (muted) return "mic_off" if (muted) return "mic_off"
return "mic" return "mic"
} }
@@ -130,7 +131,8 @@ Rectangle {
DankIcon { DankIcon {
name: { name: {
let muted = AudioService.source.audio.muted || AudioService.source.audio.volume === 0.0 const sourceAudio = AudioService.source?.audio
const muted = !sourceAudio || sourceAudio.muted || sourceAudio.volume === 0.0
if (muted) return "mic_off" if (muted) return "mic_off"
return "mic" return "mic"
} }