disallow notifications while plugged or charging.

This commit is contained in:
Turann_
2026-02-02 17:43:14 +03:00
parent 13996fa250
commit bb6bedfcac
+2 -2
View File
@@ -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);
}