Menu: Actually hide PlatformNav if !hasKeys

Returning {} just leads to a present but blank entry

(Also, nobody notice that the capcheck was wrong inside platnav anyway ;p).
This commit is contained in:
NiLuJe
2023-08-12 00:53:11 +02:00
parent 8337bdc2ae
commit 06ab76e4ba
3 changed files with 7 additions and 9 deletions

View File

@@ -1,15 +1,9 @@
local Device = require("device")
-- Everything in there requires physicla page turn keys ;).
if Device:hasKeys() then
-- No menu entry at all if we don't have any
return {}
end
local Event = require("ui/event")
local UIManager = require("ui/uimanager")
local _ = require("gettext")
-- This whole menu is hidden behind a hasKeys device cap.
local PlatformNav = {
text = _("Page turn behavior"), -- Mainly so as to differentiate w/ "Page Turns" when in readermenu...
sub_item_table = {