mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
* Restore '+' prefix when charging in the footer w/ letters prefixes Regression since #5537 * Don't use a full battery icon in the menu entry Make it clear that one isn't in-sync with the current gauge
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user