|
|
@ -135,7 +135,7 @@ local footerTextGeneratorMap = {
|
|
|
|
return (prefix .. " %d"):format(powerd:frontlightIntensity())
|
|
|
|
return (prefix .. " %d"):format(powerd:frontlightIntensity())
|
|
|
|
end
|
|
|
|
end
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if footer.settings.hide_empty_generators then
|
|
|
|
if footer.settings.all_at_once and footer.settings.hide_empty_generators then
|
|
|
|
return ""
|
|
|
|
return ""
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return T(_("%1 Off"), prefix)
|
|
|
|
return T(_("%1 Off"), prefix)
|
|
|
@ -189,7 +189,7 @@ local footerTextGeneratorMap = {
|
|
|
|
local symbol_type = footer.settings.item_prefix or "icons"
|
|
|
|
local symbol_type = footer.settings.item_prefix or "icons"
|
|
|
|
local prefix = symbol_prefix[symbol_type].bookmark_count
|
|
|
|
local prefix = symbol_prefix[symbol_type].bookmark_count
|
|
|
|
local bookmark_count = footer.ui.bookmark:getNumberOfBookmarks()
|
|
|
|
local bookmark_count = footer.ui.bookmark:getNumberOfBookmarks()
|
|
|
|
if footer.settings.hide_empty_generators and bookmark_count == 0 then
|
|
|
|
if footer.settings.all_at_once and footer.settings.hide_empty_generators and bookmark_count == 0 then
|
|
|
|
return ""
|
|
|
|
return ""
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return prefix .. " " .. tostring(bookmark_count)
|
|
|
|
return prefix .. " " .. tostring(bookmark_count)
|
|
|
@ -310,7 +310,7 @@ local footerTextGeneratorMap = {
|
|
|
|
if NetworkMgr:isWifiOn() then
|
|
|
|
if NetworkMgr:isWifiOn() then
|
|
|
|
return symbol_prefix.icons.wifi_status
|
|
|
|
return symbol_prefix.icons.wifi_status
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if footer.settings.hide_empty_generators then
|
|
|
|
if footer.settings.all_at_once and footer.settings.hide_empty_generators then
|
|
|
|
return ""
|
|
|
|
return ""
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return symbol_prefix.icons.wifi_status_off
|
|
|
|
return symbol_prefix.icons.wifi_status_off
|
|
|
@ -321,7 +321,7 @@ local footerTextGeneratorMap = {
|
|
|
|
if NetworkMgr:isWifiOn() then
|
|
|
|
if NetworkMgr:isWifiOn() then
|
|
|
|
return T(_("%1 On"), prefix)
|
|
|
|
return T(_("%1 On"), prefix)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if footer.settings.hide_empty_generators then
|
|
|
|
if footer.settings.all_at_once and footer.settings.hide_empty_generators then
|
|
|
|
return ""
|
|
|
|
return ""
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return T(_("%1 Off"), prefix)
|
|
|
|
return T(_("%1 Off"), prefix)
|
|
|
@ -984,6 +984,20 @@ function ReaderFooter:addToMainMenu(menu_items)
|
|
|
|
end,
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getMinibarOption("all_at_once", self.updateFooterTextGenerator),
|
|
|
|
getMinibarOption("all_at_once", self.updateFooterTextGenerator),
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
text = _("Hide empty items"),
|
|
|
|
|
|
|
|
help_text = _([[This will hide values like 0 or off.]]),
|
|
|
|
|
|
|
|
enabled_func = function()
|
|
|
|
|
|
|
|
return self.settings.all_at_once
|
|
|
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
checked_func = function()
|
|
|
|
|
|
|
|
return self.settings.hide_empty_generators
|
|
|
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
callback = function()
|
|
|
|
|
|
|
|
self.settings.hide_empty_generators = not self.settings.hide_empty_generators
|
|
|
|
|
|
|
|
self:refreshFooter(true, true)
|
|
|
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
},
|
|
|
|
getMinibarOption("reclaim_height"),
|
|
|
|
getMinibarOption("reclaim_height"),
|
|
|
|
{
|
|
|
|
{
|
|
|
|
text = _("Auto refresh"),
|
|
|
|
text = _("Auto refresh"),
|
|
|
@ -1005,17 +1019,6 @@ function ReaderFooter:addToMainMenu(menu_items)
|
|
|
|
self:refreshFooter(true, true)
|
|
|
|
self:refreshFooter(true, true)
|
|
|
|
end,
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
|
|
|
|
text = _("Hide empty items"),
|
|
|
|
|
|
|
|
help_text = _([[This will hide values like 0 or off.]]),
|
|
|
|
|
|
|
|
checked_func = function()
|
|
|
|
|
|
|
|
return self.settings.hide_empty_generators
|
|
|
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
callback = function()
|
|
|
|
|
|
|
|
self.settings.hide_empty_generators = not self.settings.hide_empty_generators
|
|
|
|
|
|
|
|
self:refreshFooter(true, true)
|
|
|
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
text = _("Lock status bar"),
|
|
|
|
text = _("Lock status bar"),
|
|
|
|
checked_func = function()
|
|
|
|
checked_func = function()
|
|
|
|