mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Minor Input & TimeVal cleanups
* Input: Don't create a new TimeVal object for input frame timestamps, just promote our existing table by assigning it the `TimeVal` metatable. * TimeVal: Export (const) `zero` & `huge` TimeVal objects, because they're common enough in our codebase. (NOTE: not actually const, that's a Lua 5.4 feature ;p). * GestureDetector: Explain the behavior of the `last_tevs` & `first_tevs` tables, and why one needs a new object and not the other. * Speaking of, simplify the copy method for `first_tevs`, because it doesn't need to create a new TimeVal object, we can just reference the original, it's unique and re-assigned for each frame.
This commit is contained in:
@@ -110,7 +110,7 @@ function ReaderDictionary:init()
|
||||
-- Allow quick interruption or dismiss of search result window
|
||||
-- with tap if done before this delay. After this delay, the
|
||||
-- result window is shown and dismiss prevented for a few 100ms
|
||||
self.quick_dismiss_before_delay = TimeVal:new{ sec = 3 }
|
||||
self.quick_dismiss_before_delay = TimeVal:new{ sec = 3, usec = 0 }
|
||||
|
||||
-- Gather info about available dictionaries
|
||||
if not available_ifos then
|
||||
|
||||
Reference in New Issue
Block a user