From b767394fc2075829c93f6b3479c6c8fb2fac505b Mon Sep 17 00:00:00 2001 From: chrox Date: Wed, 3 Dec 2014 12:55:53 +0800 Subject: [PATCH] fix #1150 by adding FOLLOW_LINK_TIMEOUT variable --- defaults.lua | 5 +++++ frontend/apps/reader/modules/readerlink.lua | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/defaults.lua b/defaults.lua index 5bb771b53..9f46d0de8 100644 --- a/defaults.lua +++ b/defaults.lua @@ -58,6 +58,11 @@ DCREREADER_TWO_PAGE_THRESHOLD = 7 -- page overlap pixels DOVERLAPPIXELS = 30 +-- timeout to show link rectangle around links +-- default to 0.5 second +-- set to 0 to disable showing rectangle and follow link immediately +FOLLOW_LINK_TIMEOUT = 0.5 + -- customizable tap zones(rectangles) -- x: x coordinate of top left corner in proportion of screen width -- y: y coordinate of top left corner in proportion of screen height diff --git a/frontend/apps/reader/modules/readerlink.lua b/frontend/apps/reader/modules/readerlink.lua index fa1d2d855..b4972ad88 100644 --- a/frontend/apps/reader/modules/readerlink.lua +++ b/frontend/apps/reader/modules/readerlink.lua @@ -90,7 +90,7 @@ function ReaderLink:onTap(arg, ges) if sbox then UIManager:show(LinkBox:new{ box = sbox, - timeout = 0.5, + timeout = FOLLOW_LINK_TIMEOUT, callback = function() self:onGotoLink(link) end }) return true