修复:自动任务电池状态中充电器任意无法触发 #395

This commit is contained in:
pppscn 2024-02-15 12:37:58 +08:00
parent b930209772
commit 0b7ecc4096

View File

@ -73,7 +73,7 @@ data class ChargeSetting(
fun getMsg(statusNew: Int, statusOld: Int, pluggedNew: Int, pluggedOld: Int, batteryInfo: String): String {
if (statusNew != status || pluggedNew != plugged) return ""
if (statusNew != status || (pluggedNew != plugged && plugged != 0)) return ""
return getString(R.string.battery_status_changed) + getStatusStr(statusOld) + "(" + getPluggedStr(pluggedOld) + ") → " + getStatusStr(statusNew) + "(" + getPluggedStr(pluggedNew) + ")" + batteryInfo
}