mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
VirtualKeyboard: Revamp visibility handling (#10852)
Move as much of the state tracking as possible inside VirtualKeyboard itself. InputDialog unfortunately needs an internal tracking of this state because it needs to know about it *before* the VK is shown, so we have to keep a bit of duplication in there, although we do try much harder to keep everything in sync (at least at function call edges), and to keep the damage contained to, essentially, the toggle button's handler. (Followup to #10803 & #10850)
This commit is contained in:
@@ -920,10 +920,10 @@ function ReaderStyleTweak:editBookTweak(touchmenu_instance)
|
||||
end
|
||||
end
|
||||
end,
|
||||
-- Set/save view and cursor position callback
|
||||
-- Store/retrieve view and cursor position callback
|
||||
view_pos_callback = function(top_line_num, charpos)
|
||||
-- This same callback is called with no argument to get initial position,
|
||||
-- and with arguments to give back final position when closed.
|
||||
-- This same callback is called with no arguments on init to retrieve the stored initial position,
|
||||
-- and with arguments to store the final position on close.
|
||||
if top_line_num and charpos then
|
||||
self.book_style_tweak_last_edit_pos = {top_line_num, charpos}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user