mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
disallow notifications while plugged or charging.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user