Menu widget: fix item property name (#11534)

reviewable/pr11542/r1^2
hius07 2 months ago committed by GitHub
parent 0eaa2d8248
commit 5414858b74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -535,7 +535,7 @@ function ReaderBookmark:onShowBookmark(match_table)
UIManager:close(textviewer)
bookmark:setHighlightedText(item)
if bookmark.show_edited_only then
table.remove(item_table, item.index)
table.remove(item_table, item.idx)
end
bookmark.refresh()
end,
@ -559,7 +559,7 @@ function ReaderBookmark:onShowBookmark(match_table)
ok_text = _("Remove"),
ok_callback = function()
bookmark:removeHighlight(item)
table.remove(item_table, item.index)
table.remove(item_table, item.idx)
bm_menu:switchItemTable(nil, item_table, -1)
UIManager:close(textviewer)
end,

@ -1065,7 +1065,7 @@ function Menu:updateItems(select_number)
-- calculate index in item_table
local i = (self.page - 1) * self.perpage + c
if i <= #self.item_table then
self.item_table[i].index = i -- item.index is valid only for items that have been displayed
self.item_table[i].idx = i -- index is valid only for items that have been displayed
local item_shortcut = nil
local shortcut_style = "square"
if self.is_enable_shortcut then

Loading…
Cancel
Save