readerbookmark: fix editing highlighted text for orphanede bookmark

reviewable/pr11553/r2
hius07 2 months ago committed by GitHub
parent 50052eaf23
commit 7c80d8cdda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1158,8 +1158,10 @@ function ReaderBookmark:setHighlightedText(item, text)
end
-- highlight
local hl = self.ui.highlight:getHighlightByDatetime(item.datetime)
hl.text = text
hl.edited = edited
if hl then -- skip orphaned bookmark
hl.text = text
hl.edited = edited
end
-- bookmark
local index = self:getBookmarkIndexBinarySearch(item) or self:getBookmarkIndexFullScan(item)
local bm = self.bookmarks[index]

Loading…
Cancel
Save