Update readerhighlight.lua

reviewable/pr11563/r9
hius07 1 month ago committed by GitHub
parent 0087f95b8b
commit b961d894ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -836,7 +836,7 @@ function ReaderHighlight:updateHighlight(index, side, direction, move_by_char)
highlight.pos0 = updated_highlight_beginning
highlight.page = updated_highlight_beginning
highlight.chapter = self.ui.toc:getTocTitleByPage(updated_highlight_beginning)
highlight.pos_percent = self.ui.annotation:getPosPercent(updated_highlight_beginning)
highlight.pageno = self.document:getPageFromXPointer(updated_highlight_beginning)
end
end
else -- we move pos1
@ -1758,7 +1758,6 @@ function ReaderHighlight:saveHighlight(extend_to_sentence)
pos1 = self.selected_text.pos1,
text = cleanupSelectedText(self.selected_text.text),
drawer = self.view.highlight.saved_drawer,
datetime = os.date("%Y-%m-%d %H:%M:%S"),
chapter = self.ui.toc:getTocTitleByPage(pg_or_xp),
}
if self.ui.paging then

Loading…
Cancel
Save