Module ui.menusorter
This module is responsible for constructing the KOReader menu based on a list of menu_items and a separate menu order.
Functions
MenuSorter:sort (item_table, order) | Sorts a flat table of menu items into a hierarchical menu based on supplied order. |
MenuSorter:findById (tbl, needle_id) | Returns a menu item by ID. |
Functions
- MenuSorter:sort (item_table, order)
-
Sorts a flat table of menu items into a hierarchical menu based on supplied order.
Parameters:
Returns:
-
table
the sorted menu item table
- MenuSorter:findById (tbl, needle_id)
-
Returns a menu item by ID.
Parameters:
Returns:
-
table
a reference to the table item if found