[UX] Don't show low battery warning when charging (#4563)

Fix #4560
pull/4569/head
NiLuJe 5 years ago committed by Frans de Jonge
parent abc6d17a25
commit 491f24d3d1

@ -16,7 +16,9 @@ function ReaderDeviceStatus:init()
self.checkLowBattery = function()
local threshold = G_reader_settings:readSetting("low_battery_threshold") or 20
local battery_capacity = powerd:getCapacity()
if powerd:getDissmisBatteryStatus() ~= true and battery_capacity <= threshold then
if powerd:isCharging() then
powerd:setDissmisBatteryStatus(false)
elseif powerd:getDissmisBatteryStatus() ~= true and battery_capacity <= threshold then
local low_battery_info
low_battery_info = ButtonDialogTitle:new {
modal = true,

Loading…
Cancel
Save