PDF reader: Annotation name display changes

- Show creator's name in groups even when it's the current user
- Don't show name for external annotations
This commit is contained in:
Dan Stillman 2022-02-02 03:54:34 -05:00
parent 3902043669
commit 4e6b68477d

View file

@ -118,12 +118,10 @@ Zotero.Annotations = new function () {
o.type = item.annotationType;
o.isExternal = item.annotationIsExternal;
o.isAuthor = !item.createdByUserID || item.createdByUserID == Zotero.Users.getCurrentUserID();
if (!o.isAuthor) {
if (!o.isExternal && item.library.libraryType == 'group') {
o.authorName = Zotero.Users.getName(item.createdByUserID);
}
// TODO: Replace this with the actual code that checks if user is a group admin
let isGroupAdmin = false;
o.readOnly = o.isExternal || (!o.isAuthor && !isGroupAdmin);
o.readOnly = o.isExternal || !o.isAuthor;
if (o.type == 'highlight') {
o.text = item.annotationText;
}