1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-11 02:13:30 +09:00

Refact | Sync all text blocks (#719)

This commit is contained in:
Evgenii Kozlov 2020-08-21 12:10:29 +02:00 committed by GitHub
parent fe02121979
commit 6f5598222b
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 185 additions and 151 deletions

View file

@ -543,7 +543,11 @@ class PageViewModel(
view: BlockView.Text
) {
val update = TextUpdate.Pattern(
val update = if (view is BlockView.Text.Paragraph) TextUpdate.Pattern(
target = view.id,
text = view.text,
markup = view.marks.map { it.mark() }
) else TextUpdate.Default(
target = view.id,
text = view.text,
markup = view.marks.map { it.mark() }