From bb6bedfcac39bb1ec0e5e33a721d6a56b1612ad6 Mon Sep 17 00:00:00 2001 From: Turann_ Date: Mon, 2 Feb 2026 17:43:14 +0300 Subject: [PATCH] disallow notifications while plugged or charging. --- Services/Hardware/BatteryService.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Services/Hardware/BatteryService.qml b/Services/Hardware/BatteryService.qml index 0b289140a..8772e824f 100644 --- a/Services/Hardware/BatteryService.qml +++ b/Services/Hardware/BatteryService.qml @@ -281,13 +281,13 @@ Singleton { return; } - const percentage = 1 //getPercentage(device); + const percentage = getPercentage(device); const charging = isCharging(device); const plugged = isPluggedIn(device); const level = "low"; //isLowBattery(device) ? "low" : isCriticalBattery(device) ? "critical" : ""; Logger.e("BatteryServiceDebug", "Device: " + device.model + " Percentage: " + percentage + " Charging: " + charging + " Plugged: " + plugged + " Level: " + level); - if (level) { + if (level && !charging && !plugged) { notify(device, level); }