Skip to content

Build your personal knowledge base with Trilium Notes

chore(ts/Fattachment): add getUtcDateScheduledForErasureSince, since UtcDateScheduledForErasureSince is private

Panagiotis Papadopoulos99e520cbbc8e
diff --git a/src/public/app/entities/fattachment.ts b/src/public/app/entities/fattachment.ts
index 499e80731a..484b557053 100644
--- a/src/public/app/entities/fattachment.ts
+++ b/src/public/app/entities/fattachment.ts
@@ -61,6 +61,10 @@ class FAttachment {
return this.ownerId;
}
+ getUtcDateScheduledForErasureSince() {
+ return this.utcDateScheduledForErasureSince;
+ }
+
async getBlob() {
return await this.froca.getBlob("attachments", this.attachmentId);
}
diff --git a/src/public/app/widgets/attachment_detail.ts b/src/public/app/widgets/attachment_detail.ts
index e723c82b9d..5b37a94c22 100644
--- a/src/public/app/widgets/attachment_detail.ts
+++ b/src/public/app/widgets/attachment_detail.ts
@@ -140,7 +140,7 @@ export default class AttachmentDetailWidget extends BasicWidget {
}
const $deletionWarning = this.$wrapper.find(".attachment-deletion-warning");
- const { utcDateScheduledForErasureSince } = this.attachment;
+ const utcDateScheduledForErasureSince = this.attachment.getUtcDateScheduledForErasureSince();
if (utcDateScheduledForErasureSince) {
this.$wrapper.addClass("scheduled-for-deletion");