mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Docs: cosmetic updates and additions
* Content from wiki had some cosmetic leftover glitches * Added/adapted some docs for other modules
This commit is contained in:
committed by
Qingping Hou
parent
5de8310aa6
commit
c847d628e1
@@ -42,6 +42,10 @@ function MenuSorter:mergeAndSort(config_prefix, item_table, order)
|
||||
return self:sort(item_table, order)
|
||||
end
|
||||
|
||||
--- Sorts a flat table of menu items into a hierarchical menu based on supplied order.
|
||||
---- @tparam table item_table menu item table
|
||||
---- @tparam table order sorting order
|
||||
---- @treturn table the sorted menu item table
|
||||
function MenuSorter:sort(item_table, order)
|
||||
local menu_table = {}
|
||||
local sub_menus = {}
|
||||
@@ -145,8 +149,8 @@ function MenuSorter:sort(item_table, order)
|
||||
end
|
||||
|
||||
--- Returns a menu item by ID.
|
||||
---- @param tbl Lua table
|
||||
---- @param needle_id Menu item ID string
|
||||
---- @tparam table tbl Lua table
|
||||
---- @tparam string needle_id Menu item ID string
|
||||
---- @treturn table a reference to the table item if found
|
||||
function MenuSorter:findById(tbl, needle_id)
|
||||
local items = {}
|
||||
|
||||
Reference in New Issue
Block a user