mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
SkimToWidget: fix next/prev bookmark not updating it (#6216)
This commit is contained in:
@@ -243,7 +243,7 @@ function SkimToWidget:init()
|
||||
width = self.button_width,
|
||||
show_parent = self,
|
||||
callback = function()
|
||||
self.ui:handleEvent(Event:new("GotoNextBookmarkFromPage"))
|
||||
self:goToByEvent("GotoNextBookmarkFromPage")
|
||||
end,
|
||||
hold_callback = function()
|
||||
local page = self.ui.bookmark:getLastBookmarkedPageFromPage(self.ui:getCurrentPage())
|
||||
@@ -260,7 +260,7 @@ function SkimToWidget:init()
|
||||
width = self.button_width,
|
||||
show_parent = self,
|
||||
callback = function()
|
||||
self.ui:handleEvent(Event:new("GotoPreviousBookmarkFromPage"))
|
||||
self:goToByEvent("GotoPreviousBookmarkFromPage")
|
||||
end,
|
||||
hold_callback = function()
|
||||
local page = self.ui.bookmark:getFirstBookmarkedPageFromPage(self.ui:getCurrentPage())
|
||||
@@ -409,6 +409,15 @@ function SkimToWidget:goToBookmark(page)
|
||||
end
|
||||
end
|
||||
|
||||
function SkimToWidget:goToByEvent(event_name)
|
||||
if event_name then
|
||||
self:addOriginToLocationStack()
|
||||
self.ui:handleEvent(Event:new(event_name))
|
||||
self.curr_page = self.ui:getCurrentPage()
|
||||
self:update()
|
||||
end
|
||||
end
|
||||
|
||||
function SkimToWidget:onAnyKeyPressed()
|
||||
UIManager:close(self)
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user