From 827581ac728330b38853450ff59c3afca00fe488 Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Sun, 2 Apr 2023 10:31:43 +0300 Subject: [PATCH] readerbookmark: fix writing pdf annotation (#10287) --- frontend/apps/reader/modules/readerbookmark.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerbookmark.lua b/frontend/apps/reader/modules/readerbookmark.lua index 15a95442a..97ecee1a9 100644 --- a/frontend/apps/reader/modules/readerbookmark.lua +++ b/frontend/apps/reader/modules/readerbookmark.lua @@ -1064,7 +1064,9 @@ function ReaderBookmark:setBookmarkNote(item, from_highlight, is_new_note, new_t local bm = self.bookmarks[index] bm.text = value self.ui:handleEvent(Event:new("BookmarkEdited", bm)) - self.ui.highlight:writePdfAnnotation("content", bookmark.page, bookmark, bookmark.text) + if bookmark.highlighted then + self.ui.highlight:writePdfAnnotation("content", bookmark.page, bookmark, bookmark.text) + end UIManager:close(self.input) if from_highlight then if self.view.highlight.note_mark then