chore(ts/Fattachment): add getContentLength, since contentLength is private

This commit is contained in:
Panagiotis Papadopoulos 2025-02-22 19:13:40 +01:00
parent 99e520cbbc
commit 5d4dc91cc3
2 changed files with 5 additions and 1 deletions

View File

@ -61,6 +61,10 @@ class FAttachment {
return this.ownerId; return this.ownerId;
} }
getContentLength() {
return this.contentLength;
}
getUtcDateScheduledForErasureSince() { getUtcDateScheduledForErasureSince() {
return this.utcDateScheduledForErasureSince; return this.utcDateScheduledForErasureSince;
} }

View File

@ -164,7 +164,7 @@ export default class AttachmentDetailWidget extends BasicWidget {
$deletionWarning.hide(); $deletionWarning.hide();
} }
this.$wrapper.find(".attachment-details").text(t("attachment_detail_2.role_and_size", { role: this.attachment.role, size: utils.formatSize(this.attachment.contentLength) })); this.$wrapper.find(".attachment-details").text(t("attachment_detail_2.role_and_size", { role: this.attachment.role, size: utils.formatSize(this.attachment.getContentLength()) }));
this.$wrapper.find(".attachment-actions-container").append(this.attachmentActionsWidget.render()); this.$wrapper.find(".attachment-actions-container").append(this.attachmentActionsWidget.render());
const { $renderedContent } = await contentRenderer.getRenderedContent(this.attachment, { imageHasZoom: this.isFullDetail }); const { $renderedContent } = await contentRenderer.getRenderedContent(this.attachment, { imageHasZoom: this.isFullDetail });