Show vertical marker at original position when back from link (#3669)

ReaderLink: make all links be a table (they were a table for PDF,
but a string for CRE) for clearer code. Also have location_stack
store them as tables, with additional properties.
Get original position of link source (and verify it is valid)
so we can show a marker there.

Also:
Hold on "Go back to previous location" to clear location stack.
Resists "Swipe to go back" when previous locations stack has just
become empty, and show a notification.
Fix wrong links with Swipe to follow nearest link on PDF documents.
This commit is contained in:
poire-z
2018-02-09 17:06:16 +01:00
committed by Frans de Jonge
parent e7be8ef34d
commit 59496c1d46
3 changed files with 209 additions and 50 deletions

View File

@@ -103,7 +103,7 @@ function ReaderSearch:onShowSearchDialog(text)
end
end
if valid_link then
self.ui.link:onGotoLink(valid_link, neglect_current_location)
self.ui.link:onGotoLink({xpointer=valid_link}, neglect_current_location)
end
end
-- Don't add result pages to location ("Go back") stack