Fix attachment row rendering bug with web attachment

This commit is contained in:
windingwind 2024-01-12 23:43:04 +08:00 committed by Dan Stillman
parent 607f9814a0
commit 3603254d35

View file

@ -119,7 +119,7 @@ import { getCSSItemTypeIcon } from 'components/icons';
this._attachmentButton.querySelector(".icon").replaceWith(getCSSItemTypeIcon(this._attachment.getItemTypeIconName()));
this._attachmentButton.querySelector(".label").textContent = this._attachment.getField('title');
let annotationCount = this.attachment.getAnnotations().length;
let annotationCount = this.attachment.isWebAttachment() ? 0 : this.attachment.getAnnotations().length;
this._annotationButton.hidden = annotationCount === 0;
this._annotationButton.querySelector(".label").textContent = annotationCount;
}