checked function added to battery comp. (alt status bar)

reviewable/pr11678/r1
SomeGuy 1 month ago committed by GitHub
parent 249d1380d7
commit 5e3013c26c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -207,7 +207,7 @@ The alternative status bar can be configured here.]])
function ReaderCoptListener:getAltStatusBarMenu() function ReaderCoptListener:getAltStatusBarMenu()
return { return {
text = _("Alt status bar"), text = _("Alternative status bar"),
separator = true, separator = true,
sub_item_table = { sub_item_table = {
{ {
@ -294,15 +294,18 @@ function ReaderCoptListener:getAltStatusBarMenu()
}, },
{ {
text_func = function() text_func = function()
local status = _("off") local status = _(" ")
if self.battery == 1 then if self.battery == 1 then
if self.battery_percent == 1 then if self.battery_percent == 1 then
status = _("percentage") status = _(": percentage")
else else
status = _("icon") status = _(": icon")
end end
end end
return T(_("Battery status: %1"), status) return T(_("Battery status".. "%1"), status)
end,
checked_func = function()
return self.battery == 1 and self.battery_percent == 0 or self.battery_percent == 1
end, end,
sub_item_table = { sub_item_table = {
{ {

Loading…
Cancel
Save