diff --git a/CHANGELOG.md b/CHANGELOG.md index 52a5842d34..6dd6bbbf6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes & tech 🚒 +* Editor | Failing to render objects containing at least one file block with embedded pdf (#2037) * Editor | When trying to set a link to an object or to a web page for a text selection, the dedicated screen should not block the editor when the bottom sheet is hidden by swiping down (#2036) ## Version 0.5.0 diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/render/DefaultBlockViewRenderer.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/render/DefaultBlockViewRenderer.kt index f1c51c70fb..6fead44ba1 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/render/DefaultBlockViewRenderer.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/render/DefaultBlockViewRenderer.kt @@ -976,6 +976,17 @@ class DefaultBlockViewRenderer( selection = selection ) ) + Content.File.Type.PDF -> content.toFileView( + id = block.id, + urlBuilder = urlBuilder, + indent = indent, + mode = if (mode == EditorMode.Edit) BlockView.Mode.EDIT else BlockView.Mode.READ, + isSelected = checkIfSelected( + mode = mode, + block = block, + selection = selection + ) + ) Content.File.Type.NONE -> content.toFileView( id = block.id, urlBuilder = urlBuilder,