mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Touch menu: always go up to correct parent page (#12378)
This commit is contained in:
@@ -1684,11 +1684,6 @@ With this feature enabled, the current page is factored in, resulting in the cou
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
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
|
end
|
||||||
|
|
||||||
-- settings menu item generators
|
-- settings menu item generators
|
||||||
|
|||||||
@@ -902,7 +902,6 @@ function Dispatcher:_addItem(caller, menu, location, settings, section)
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
separator = settingsList[k].separator,
|
separator = settingsList[k].separator,
|
||||||
menu_item_id = k,
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -928,6 +928,7 @@ function TouchMenu:onMenuSelect(item, tap_on_checkmark)
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
table.insert(self.item_table_stack, self.item_table)
|
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.parent_id = item.menu_item_id
|
||||||
self.item_table = sub_item_table
|
self.item_table = sub_item_table
|
||||||
self.page = 1
|
self.page = 1
|
||||||
|
|||||||
@@ -310,7 +310,6 @@ function Gestures:genSubItem(ges, separator, hold_callback)
|
|||||||
sub_item_table_func = function() return self:genMenu(ges) end,
|
sub_item_table_func = function() return self:genMenu(ges) end,
|
||||||
separator = separator,
|
separator = separator,
|
||||||
hold_callback = hold_callback,
|
hold_callback = hold_callback,
|
||||||
menu_item_id = ges,
|
|
||||||
ignored_by_menu_search = true, -- This item is not strictly duplicated, but its subitems are.
|
ignored_by_menu_search = true, -- This item is not strictly duplicated, but its subitems are.
|
||||||
-- Ignoring it speeds up search.
|
-- Ignoring it speeds up search.
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user