Skip to content

Commit

Permalink
[UX] Don't show low battery warning when charging (#4563)
Browse files Browse the repository at this point in the history
Fix #4560
  • Loading branch information
NiLuJe authored and Frenzie committed Feb 8, 2019
1 parent abc6d17 commit 491f24d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/apps/reader/modules/readerdevicestatus.lua
Expand Up @@ -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,
Expand Down

0 comments on commit 491f24d

Please sign in to comment.