mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
Touch menu: always go up to correct parent page (#12378)
This commit is contained in:
parent
698fc35c3f
commit
415ce40f84
@ -1684,11 +1684,6 @@ With this feature enabled, the current page is factored in, resulting in the cou
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- Settings menu: keep the same parent page for going up from submenu
|
||||
for i = 1, #configure_items_sub_table do
|
||||
configure_items_sub_table[i].menu_item_id = i
|
||||
end
|
||||
end
|
||||
|
||||
-- settings menu item generators
|
||||
|
@ -902,7 +902,6 @@ function Dispatcher:_addItem(caller, menu, location, settings, section)
|
||||
end
|
||||
end,
|
||||
separator = settingsList[k].separator,
|
||||
menu_item_id = k,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
@ -928,6 +928,7 @@ function TouchMenu:onMenuSelect(item, tap_on_checkmark)
|
||||
end
|
||||
else
|
||||
table.insert(self.item_table_stack, self.item_table)
|
||||
item.menu_item_id = item.menu_item_id or tostring(item) -- unique id
|
||||
self.parent_id = item.menu_item_id
|
||||
self.item_table = sub_item_table
|
||||
self.page = 1
|
||||
|
@ -310,7 +310,6 @@ function Gestures:genSubItem(ges, separator, hold_callback)
|
||||
sub_item_table_func = function() return self:genMenu(ges) end,
|
||||
separator = separator,
|
||||
hold_callback = hold_callback,
|
||||
menu_item_id = ges,
|
||||
ignored_by_menu_search = true, -- This item is not strictly duplicated, but its subitems are.
|
||||
-- Ignoring it speeds up search.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user