From 8c07ea2a0e77f74d392a4f705d86fecbf3a23b36 Mon Sep 17 00:00:00 2001 From: chauhan_s Date: Wed, 1 Apr 2026 16:42:14 +0530 Subject: [PATCH] fix: allow PDF preview on readonly public pages (#14761) fixes https://github.com/toeverything/AFFiNE/issues/14727 https://www.loom.com/share/dfcd558332404896b3e02aad97b18f02 ## Summary by CodeRabbit * **Bug Fixes** * PDF attachments can now be previewed in read-only documents. --- blocksuite/affine/blocks/attachment/src/attachment-block.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocksuite/affine/blocks/attachment/src/attachment-block.ts b/blocksuite/affine/blocks/attachment/src/attachment-block.ts index 36005d6f09..c9e5365c9e 100644 --- a/blocksuite/affine/blocks/attachment/src/attachment-block.ts +++ b/blocksuite/affine/blocks/attachment/src/attachment-block.ts @@ -54,7 +54,7 @@ type AttachmentResolvedStateInfo = ResolvedStateInfo & { @Peekable({ enableOn: ({ model }: AttachmentBlockComponent) => { - return !model.store.readonly && model.props.type.endsWith('pdf'); + return model.props.type.endsWith('pdf'); }, }) export class AttachmentBlockComponent extends CaptionedBlockComponent {