mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Font list menu: allow sorting by more recently set (#10662)
- Add a toggle in Font settings> allowing showing font ordered by most recently selected (long-press on it allows clearing this history). - Keep in G_reader_settings a list of known fonts, so we can notice newly added user fonts, and put them at the start of the most recently selected. Show these new fonts with a symbol in the menu. - TouchMenu: allows for a flag to trigger menu refresh when going up.
This commit is contained in:
@@ -798,6 +798,11 @@ end
|
||||
function TouchMenu:backToUpperMenu(no_close)
|
||||
if #self.item_table_stack ~= 0 then
|
||||
self.item_table = table.remove(self.item_table_stack)
|
||||
-- Allow a menu table to refresh itself when going up (ie. from a setting
|
||||
-- submenu that may want to have its parent menu updated).
|
||||
if self.item_table.needs_refresh and self.item_table.refresh_func then
|
||||
self.item_table = self.item_table.refresh_func()
|
||||
end
|
||||
self.page = 1
|
||||
if self.parent_id then
|
||||
self:_recalculatePageLayout() -- we need an accurate self.perpage
|
||||
|
||||
Reference in New Issue
Block a user