Commit 2df8e5de authored by WorldTeacher's avatar WorldTeacher
Browse files

fix(menu): use text_func instead of text for dynamic pending count

The 'Sync Pending Now' menu item was showing 'function: 0x...' instead
of the actual count. Changed from text= to text_func= which is the
correct KOReader API for dynamic menu text.

Fixes: Display issue when no pending sessions exist
parent c3e21785
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -537,7 +537,7 @@ function BookloreSync:addToMainMenu(menu_items)
        text = _("Manage Sessions"),
        sub_item_table = {
            {
                text = function()
                text_func = function()
                    local count = self.db and self.db:getPendingSessionCount() or 0
                    return T(_("Sync Pending Now (%1 sessions)"), tonumber(count) or 0)
                end,