Revert "Update BatteryService.qml"

This reverts commit 0872ac08ba.
This commit is contained in:
Turann_
2026-02-01 01:28:46 +03:00
parent 0872ac08ba
commit 61a1e0adff
+4 -8
View File
@@ -154,15 +154,11 @@ Singleton {
// Don't show name for laptop batteries
if (!isBluetoothDevice(device) && device.isLaptopBattery) {
// Logger.e("BatteryDebug", "Available Battery count: " + laptopBatteries.length); // can be useful for debugging
// If there is more than one battery explicitly name them
if (laptopBatteries.length > 1) {
for (var bc = 0; bc < laptopBatteries.length; bc++) {
if (laptopBatteries[bc] === device) {
// In case of 2 batteries: bat0 => bat1 bat1 => bat2
return I18n.tr("common.battery") + " " + (bc + 1);
}
}
// Logger.e("BatteryDebug", "Available Battery count: " + laptopBatteries.length); // can be useful for debugging
if (laptopBatteries.length > 1 && device.nativePath) {
// In case of 2 batteries: bat0 => bat1 bat1 => bat2
return I18n.tr("common.battery") + " " + parseInt(device.nativePath.substring(3) + 1);
}
// If only one battery no numbers needed.
return I18n.tr("common.battery");