mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[UX] Gesture manager: add action - show dictionary/Wikipedia (#4699)
References #4687.
This commit is contained in:
@@ -65,13 +65,7 @@ end
|
||||
function ReaderWikipedia:addToMainMenu(menu_items)
|
||||
menu_items.wikipedia_lookup = {
|
||||
text = _("Wikipedia lookup"),
|
||||
callback = function()
|
||||
if NetworkMgr:isOnline() then
|
||||
self:lookupInput()
|
||||
else
|
||||
NetworkMgr:promptWifiOn()
|
||||
end
|
||||
end
|
||||
callback = function() self:onShowWikipediaLookup() end,
|
||||
}
|
||||
menu_items.wikipedia_history = {
|
||||
text = _("Wikipedia history"),
|
||||
@@ -528,4 +522,13 @@ end
|
||||
function ReaderWikipedia:onSaveSettings()
|
||||
end
|
||||
|
||||
function ReaderWikipedia:onShowWikipediaLookup()
|
||||
if NetworkMgr:isOnline() then
|
||||
self:lookupInput()
|
||||
else
|
||||
NetworkMgr:promptWifiOn()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
return ReaderWikipedia
|
||||
|
||||
Reference in New Issue
Block a user