mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -465,7 +465,9 @@ To:
|
||||
end
|
||||
|
||||
-- settings > Navigation; this mostly concerns platform-specific features or physical keys, and applies *everywhere*
|
||||
self.menu_items.platform_navigation_features = require("ui/elements/platform_navigation")
|
||||
if Device:hasKeys() then
|
||||
self.menu_items.platform_navigation_features = require("ui/elements/platform_navigation")
|
||||
end
|
||||
|
||||
-- settings tab - Document submenu
|
||||
self.menu_items.document_metadata_location_move = {
|
||||
|
||||
@@ -241,7 +241,9 @@ function ReaderMenu:setUpdateItemTable()
|
||||
self.menu_items.page_turns = require("ui/elements/page_turns")
|
||||
end
|
||||
-- While also related to page turns, this mostly concerns platform-specific features or physical keys, and applies *everywhere*
|
||||
self.menu_items.platform_navigation_features = require("ui/elements/platform_navigation")
|
||||
if Device:hasKeys() then
|
||||
self.menu_items.platform_navigation_features = require("ui/elements/platform_navigation")
|
||||
end
|
||||
-- insert DjVu render mode submenu just before the last entry (show advanced)
|
||||
-- this is a bit of a hack
|
||||
if self.ui.document.is_djvu then
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user