[Non-Touch] Don't add touch-related menu items (#8608)

They were ending up orphaned as "New:" in the top menu first tab.
This commit is contained in:
poire-z
2022-01-02 15:01:08 +01:00
committed by GitHub
parent e65ff7b7c8
commit b35c28e8b4
6 changed files with 57 additions and 27 deletions

View File

@@ -139,4 +139,13 @@ if Device:hasKeys() then
})
end
if not Device:isTouchDevice() then
if Device:hasKeys() then
-- We just need the last item added above.
PageTurns = PageTurns.sub_item_table[#PageTurns.sub_item_table]
else
PageTurns = {} -- no menu item
end
end
return PageTurns