Actions for Go to first/last bookmark (#10899)

This commit is contained in:
hius07 authored and GitHub committed 2023-09-15 07:24:31 +03:00
1 parent 1f03e76aea
commit be125af949
4 files changed
+30 -49

No files matched your search

@@ -470,8 +470,6 @@ function ReaderBookmark:onShowBookmark(match_table)
item_table = item_table,
is_borderless = true,
is_popout = false,
width = Screen:getWidth(),
height = Screen:getHeight(),
items_per_page = items_per_page,
items_font_size = items_font_size,
multilines_show_more_text = multilines_show_more_text,
@@ -1330,6 +1328,22 @@ function ReaderBookmark:onGotoPreviousBookmarkFromPage(add_current_location_to_s
return true
end
function ReaderBookmark:onGotoFirstBookmark(add_current_location_to_stack)
if add_current_location_to_stack ~= false then -- nil or true
self.ui.link:addCurrentLocationToStack()
end
self:gotoBookmark(self:getFirstBookmarkedPageFromPage(self.ui:getCurrentPage()))
return true
end
function ReaderBookmark:onGotoLastBookmark(add_current_location_to_stack)
if add_current_location_to_stack ~= false then -- nil or true
self.ui.link:addCurrentLocationToStack()
end
self:gotoBookmark(self:getLastBookmarkedPageFromPage(self.ui:getCurrentPage()))
return true
end
function ReaderBookmark:getLatestBookmark()
local latest_bookmark, latest_bookmark_idx
local latest_bookmark_datetime = "0"