1 parent
abc6d17a25
commit
491f24d3d1
1 file changed
+3
-1
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user