filemanagermenu: fix classic mode items per page (#11346)

reviewable/pr11349/r1
hius07 4 months ago committed by GitHub
parent 0ceb88a9a3
commit c4e9e6bc51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -172,7 +172,7 @@ function FileManagerMenu:setUpdateItemTable()
sub_item_table = { sub_item_table = {
{ {
text_func = function() text_func = function()
return T(_("Items per page: %1"), FileChooser.perpage) return T(_("Items per page: %1"), G_reader_settings:readSetting("items_per_page"))
end, end,
help_text = _([[This sets the number of items per page in: help_text = _([[This sets the number of items per page in:
- File browser, history and favorites in 'classic' display mode - File browser, history and favorites in 'classic' display mode
@ -180,7 +180,7 @@ function FileManagerMenu:setUpdateItemTable()
- File and folder selection - File and folder selection
- Calibre and OPDS browsers/search results]]), - Calibre and OPDS browsers/search results]]),
callback = function(touchmenu_instance) callback = function(touchmenu_instance)
local current_value = FileChooser.perpage local current_value = G_reader_settings:readSetting("items_per_page")
local default_value = FileChooser.items_per_page_default local default_value = FileChooser.items_per_page_default
local widget = SpinWidget:new{ local widget = SpinWidget:new{
title_text = _("Items per page"), title_text = _("Items per page"),
@ -204,7 +204,7 @@ function FileManagerMenu:setUpdateItemTable()
end, end,
callback = function(touchmenu_instance) callback = function(touchmenu_instance)
local current_value = FileChooser.font_size local current_value = FileChooser.font_size
local default_value = FileChooser.getItemFontSize(FileChooser.perpage) local default_value = FileChooser.getItemFontSize(G_reader_settings:readSetting("items_per_page"))
local widget = SpinWidget:new{ local widget = SpinWidget:new{
title_text = _("Item font size"), title_text = _("Item font size"),
value = current_value, value = current_value,

Loading…
Cancel
Save