MCPcopy
hub / github.com/callumalpass/tasknotes / openAttachment

Method openAttachment

src/modals/TimeblockInfoModal.ts:389–397  ·  view source on GitHub ↗
(file: TAbstractFile)

Source from the content-addressed store, hash-verified

387 }
388
389 private openAttachment(file: TAbstractFile): void {
390 if (file instanceof TFile) {
391 void this.app.workspace.getLeaf(false).openFile(file);
392 } else {
393 new Notice(
394 this.translate("notices.timeblockFileTypeNotSupported", { fileName: file.name })
395 );
396 }
397 }
398
399 private renderAttachmentsList(): void {
400 this.attachmentsList.empty();

Callers 1

renderAttachmentsListMethod · 0.95

Calls 2

getLeafMethod · 0.80
translateMethod · 0.65

Tested by

no test coverage detected