mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
@@ -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