forked from Shinonome/dots-hyprland
make volume protection message translatable (#2164)
This commit is contained in:
@@ -39,9 +39,9 @@ Singleton {
|
|||||||
|
|
||||||
if (newVolume - lastVolume > maxAllowedIncrease) {
|
if (newVolume - lastVolume > maxAllowedIncrease) {
|
||||||
sink.audio.volume = lastVolume;
|
sink.audio.volume = lastVolume;
|
||||||
root.sinkProtectionTriggered("Illegal increment");
|
root.sinkProtectionTriggered(Translation.tr("Illegal increment"));
|
||||||
} else if (newVolume > maxAllowed || newVolume > root.hardMaxValue) {
|
} else if (newVolume > maxAllowed || newVolume > root.hardMaxValue) {
|
||||||
root.sinkProtectionTriggered("Exceeded max allowed");
|
root.sinkProtectionTriggered(Translation.tr("Exceeded max allowed"));
|
||||||
sink.audio.volume = Math.min(lastVolume, maxAllowed);
|
sink.audio.volume = Math.min(lastVolume, maxAllowed);
|
||||||
}
|
}
|
||||||
if (sink.ready && (isNaN(sink.audio.volume) || sink.audio.volume === undefined || sink.audio.volume === null)) {
|
if (sink.ready && (isNaN(sink.audio.volume) || sink.audio.volume === undefined || sink.audio.volume === null)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user