Dispatcher: add addCurrentLocationToStack

This is useful when i want to reference something a few pages away while keeping track of my current page
This commit is contained in:
yparitcher authored and Frans de Jonge committed 2023-05-05 08:06:23 +02:00
1 parent 2aeb4a87df
commit de5c872dcb
2 files changed
+9

No files matched your search

@@ -702,6 +702,13 @@ function ReaderLink:compareLocationToCurrent(saved_location)
return false, current_location
end
function ReaderLink:onAddCurrentLocationToStack(show_notification)
self:addCurrentLocationToStack()
if show_notification then
Notification:notify(_("Current location added to history."))
end
end
-- Remember current location so we can go back to it
function ReaderLink:addCurrentLocationToStack(loc)
local location = loc and loc or self:getCurrentLocation()