mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Dispatcher: fix events with static argument (#6519)
Fixes showing Favorites from a gesture.
This commit is contained in:
@@ -68,7 +68,7 @@ local settingsList = {
|
||||
calibre_search = { category="none", event="CalibreSearch", title=_("Search in calibre metadata"), device=true,},
|
||||
calibre_browse_tags = { category="none", event="CalibreBrowseTags", title=_("Browse all calibre tags"), device=true,},
|
||||
calibre_browse_series = { category="none", event="CalibreBrowseSeries", title=_("Browse all calibre series"), device=true, separator=true,},
|
||||
favorites = { category="arg", event="ShowColl", arg="favorites", title=_("Favorites"), device=true,},
|
||||
favorites = { category="none", event="ShowColl", arg="favorites", title=_("Favorites"), device=true,},
|
||||
|
||||
-- filemanager settings
|
||||
folder_up = { category="none", event="FolderUp", title=_("Folder up"), filemanager=true},
|
||||
@@ -85,11 +85,11 @@ local settingsList = {
|
||||
go_to = { category="none", event="ShowGotoDialog", title=_("Go to"), rolling=true, paging=true,},
|
||||
skim = { category="none", event="ShowSkimtoDialog", title=_("Skim"), rolling=true, paging=true,},
|
||||
back = { category="none", event="Back", title=_("Back"), rolling=true, paging=true,},
|
||||
previous_location = { category="arg", event="GoBackLink", arg=true, title=_("Back to previous location"), rolling=true, paging=true,},
|
||||
previous_location = { category="none", event="GoBackLink", arg=true, title=_("Back to previous location"), rolling=true, paging=true,},
|
||||
latest_bookmark = { category="none", event="GoToLatestBookmark", title=_("Go to latest bookmark"), rolling=true, paging=true,},
|
||||
follow_nearest_link = { category="arg", event="GoToPageLink", arg={pos={x=0,y=0}}, title=_("Follow nearest link"), rolling=true, paging=true,},
|
||||
follow_nearest_internal_link = { category="arg", event="GoToInternalPageLink", arg={pos={x=0,y=0}}, title=_("Follow nearest internal link"), rolling=true, paging=true,},
|
||||
clear_location_history = { category="arg", event="ClearLocationStack", arg=true, title=_("Clear location history"), rolling=true, paging=true, separator=true,},
|
||||
clear_location_history = { category="none", event="ClearLocationStack", arg=true, title=_("Clear location history"), rolling=true, paging=true, separator=true,},
|
||||
toc = { category="none", event="ShowToc", title=_("Table of contents"), rolling=true, paging=true,},
|
||||
bookmarks = { category="none", event="ShowBookmark", title=_("Bookmarks"), rolling=true, paging=true,},
|
||||
book_statistics = { category="none", event="ShowBookStats", title=_("Book statistics"), rolling=true, paging=true, separator=true,},
|
||||
@@ -547,7 +547,11 @@ function Dispatcher:execute(ui, settings, gesture)
|
||||
for k, v in pairs(settings) do
|
||||
if settingsList[k].conditions == nil or settingsList[k].conditions == true then
|
||||
if settingsList[k].category == "none" then
|
||||
ui:handleEvent(Event:new(settingsList[k].event))
|
||||
if settingsList[k].arg ~= nil then
|
||||
ui:handleEvent(Event:new(settingsList[k].event, settingsList[k].arg))
|
||||
else
|
||||
ui:handleEvent(Event:new(settingsList[k].event))
|
||||
end
|
||||
end
|
||||
if settingsList[k].category == "absolutenumber"
|
||||
or settingsList[k].category == "string"
|
||||
|
||||
Reference in New Issue
Block a user