2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

Remove % from frontlight level on devices other than Kobo (#3162)

This commit is contained in:
Robert 2017-09-02 18:33:40 +02:00 committed by Frans de Jonge
parent 568e8f667a
commit 40ec848098

View File

@ -43,7 +43,11 @@ local footerTextGeneratorMap = {
if not Device:hasFrontlight() then return "L: NA" end
local powerd = Device:getPowerDevice()
if powerd:isFrontlightOn() then
if Device:isKobo() then
return ("L: %d%%"):format(powerd:frontlightIntensity())
else
return ("L: %d"):format(powerd:frontlightIntensity())
end
else
return "L: Off"
end