mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Prefix battery percentage w/ a + when charging.
Adresses comments on MR. Add a comment explaining the magic behind CRe's charging icon when using CRE's full (top) status bar.
This commit is contained in:
@@ -499,6 +499,7 @@ function ReaderRolling:updateBatteryState()
|
||||
DEBUG("update battery state")
|
||||
if self.view.view_mode == "page" then
|
||||
local powerd = Device:getPowerDevice()
|
||||
-- -1 is CR_BATTERY_STATE_CHARGING @ crengine/crengine/include/lvdocview.h
|
||||
local state = powerd:isCharging() and -1 or powerd:getCapacity()
|
||||
if state then
|
||||
self.ui.document:setBatteryState(state)
|
||||
|
||||
Reference in New Issue
Block a user