From 4dd18511409bbd745b423edc4adc3fe18c855fba Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Tue, 4 Oct 2022 13:31:36 +0300 Subject: [PATCH] Don't allow pdf-reader to set annotation author name Fixes the issue when your own created annotation becomes grayish and indicates that it was modified by another user. --- chrome/content/zotero/xpcom/reader.js | 2 ++ pdf-reader | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index 824b438b32..38ba912fbd 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -1029,6 +1029,8 @@ class ReaderInstance { } } else { + // Delete authorName to prevent overwriting the existing annotationAuthorName value + delete annotation.authorName; let savedAnnotation = await Zotero.Annotations.saveFromJSON(attachment, annotation, saveOptions); let blob = this._dataURLtoBlob(annotation.image); await Zotero.Annotations.saveCacheImage(savedAnnotation, blob); diff --git a/pdf-reader b/pdf-reader index ae444f1b72..c6845bd46d 160000 --- a/pdf-reader +++ b/pdf-reader @@ -1 +1 @@ -Subproject commit ae444f1b72849b732b4b79957688c0375b6055eb +Subproject commit c6845bd46d2b664c98b76d0b4235fb684872416e