mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-28 14:07:47 -04:00
make unmute when ipc volume changes
This commit is contained in:
1 parent
729f5a1b9c
commit
938e0cf4fb
1 file changed
+6
@@ -121,6 +121,9 @@ Singleton {
|
||||
|
||||
function increment(step: string): string {
|
||||
if (root.sink && root.sink.audio) {
|
||||
if (root.sink.audio.muted) {
|
||||
root.sink.audio.muted = false
|
||||
}
|
||||
const currentVolume = Math.round(root.sink.audio.volume * 100)
|
||||
const newVolume = Math.max(0, Math.min(100, currentVolume + parseInt(
|
||||
step || "5")))
|
||||
@@ -133,6 +136,9 @@ Singleton {
|
||||
|
||||
function decrement(step: string): string {
|
||||
if (root.sink && root.sink.audio) {
|
||||
if (root.sink.audio.muted) {
|
||||
root.sink.audio.muted = false
|
||||
}
|
||||
const currentVolume = Math.round(root.sink.audio.volume * 100)
|
||||
const newVolume = Math.max(0, Math.min(100, currentVolume - parseInt(
|
||||
step || "5")))
|
||||
|
||||
Reference in new issue
Block a user