diff --git a/frontend/apps/reader/modules/readerfooter.lua b/frontend/apps/reader/modules/readerfooter.lua index b00da32c8..114f9e3a8 100644 --- a/frontend/apps/reader/modules/readerfooter.lua +++ b/frontend/apps/reader/modules/readerfooter.lua @@ -52,7 +52,7 @@ local symbol_prefix = { icons = { time = "⌚", pages_left = "⇒", - battery = "", + battery = "", percentage = "⤠", book_time_to_read = "⏳", chapter_time_to_read = "⤻", @@ -115,8 +115,10 @@ local footerTextGeneratorMap = { prefix = "" end end + return prefix .. batt_lvl .. "%" + else + return prefix .. " " .. (powerd:isCharging() and "+" or "") .. batt_lvl .. "%" end - return prefix .. (symbol_type == "icons" and "" or " ") .. batt_lvl .. "%" end, time = function(footer) local symbol_type = footer.settings.item_prefix or "icons" diff --git a/spec/unit/readerfooter_spec.lua b/spec/unit/readerfooter_spec.lua index 2a09d825a..595b9e03f 100644 --- a/spec/unit/readerfooter_spec.lua +++ b/spec/unit/readerfooter_spec.lua @@ -217,7 +217,7 @@ describe("Readerfooter module", function() assert.are.same('0%', footer.footer_text.text) -- disable battery, percentage should follow - tapFooterMenu(fake_menu, "Battery status".." ()") + tapFooterMenu(fake_menu, "Battery status".." ()") assert.are.same('⤠ 50%', footer.footer_text.text) -- disable percentage, book time to read should follow