mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Actions for Go to first/last bookmark (#10899)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user