mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix: Unhighlight is not clickable in dictionary view and Deleting highlights in bookmarks does not take effect (#3034)
* Fix: Unhighlight is not clickable in dictionary view * Fix: Deleting highlights in bookmarks does not take effect
This commit is contained in:
@@ -213,7 +213,7 @@ function ReaderBookmark:onShowBookmark()
|
||||
{
|
||||
text = _("Remove this bookmark"),
|
||||
callback = function()
|
||||
bookmark:removeBookmark(item)
|
||||
bookmark:removeHightligit(item)
|
||||
bm_menu:switchItemTable(nil, bookmark.bookmarks, -1)
|
||||
UIManager:close(self.remove_bookmark_dialog)
|
||||
end,
|
||||
@@ -315,6 +315,14 @@ function ReaderBookmark:isBookmarkAdded(item)
|
||||
return false
|
||||
end
|
||||
|
||||
function ReaderBookmark:removeHightligit(item)
|
||||
if item.pos0 then
|
||||
self.ui:handleEvent(Event:new("Unhighlight", item))
|
||||
else
|
||||
self:removeBookmark(item)
|
||||
end
|
||||
end
|
||||
|
||||
-- binary search to remove bookmark
|
||||
function ReaderBookmark:removeBookmark(item)
|
||||
local _middle
|
||||
|
||||
Reference in New Issue
Block a user