From 5e3013c26cb3ee25db2704e537bd7cecf84aaad0 Mon Sep 17 00:00:00 2001 From: SomeGuy <97603719+Commodore64user@users.noreply.github.com> Date: Sun, 14 Apr 2024 00:34:51 +0100 Subject: [PATCH] checked function added to battery comp. (alt status bar) --- frontend/apps/reader/modules/readercoptlistener.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/apps/reader/modules/readercoptlistener.lua b/frontend/apps/reader/modules/readercoptlistener.lua index 5dbd26610..a786dec30 100644 --- a/frontend/apps/reader/modules/readercoptlistener.lua +++ b/frontend/apps/reader/modules/readercoptlistener.lua @@ -207,7 +207,7 @@ The alternative status bar can be configured here.]]) function ReaderCoptListener:getAltStatusBarMenu() return { - text = _("Alt status bar"), + text = _("Alternative status bar"), separator = true, sub_item_table = { { @@ -294,15 +294,18 @@ function ReaderCoptListener:getAltStatusBarMenu() }, { text_func = function() - local status = _("off") + local status = _(" ") if self.battery == 1 then if self.battery_percent == 1 then - status = _("percentage") + status = _(": percentage") else - status = _("icon") + status = _(": icon") 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, sub_item_table = { {