mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-21 00:07:01 +08:00
fix(core): disable re-rendering of pdf embed view (#9334)
This commit is contained in:
@@ -604,7 +604,10 @@ export function patchForMobile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function patchForAttachmentEmbedViews(
|
export function patchForAttachmentEmbedViews(
|
||||||
reactToLit: (element: ElementOrFactory) => TemplateResult
|
reactToLit: (
|
||||||
|
element: ElementOrFactory,
|
||||||
|
rerendering?: boolean
|
||||||
|
) => TemplateResult
|
||||||
): ExtensionType {
|
): ExtensionType {
|
||||||
return {
|
return {
|
||||||
setup: di => {
|
setup: di => {
|
||||||
@@ -626,7 +629,8 @@ export function patchForAttachmentEmbedViews(
|
|||||||
reactToLit(
|
reactToLit(
|
||||||
<AttachmentPreviewErrorBoundary key={model.id}>
|
<AttachmentPreviewErrorBoundary key={model.id}>
|
||||||
<PDFViewerEmbedded {...buildAttachmentProps(model)} />
|
<PDFViewerEmbedded {...buildAttachmentProps(model)} />
|
||||||
</AttachmentPreviewErrorBoundary>
|
</AttachmentPreviewErrorBoundary>,
|
||||||
|
false
|
||||||
),
|
),
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user