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

Refact | header holders inheritance (#690)

This commit is contained in:
Evgenii Kozlov 2020-08-19 11:06:01 +02:00 committed by GitHub
parent 1c721af7f6
commit 7d58473097
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 197 additions and 286 deletions

View file

@ -296,7 +296,7 @@ class DefaultBlockViewRenderer(
focus: Focus,
content: Content.Text,
indent: Int
): BlockView.HeaderThree = BlockView.HeaderThree(
): BlockView.Header.Three = BlockView.Header.Three(
mode = if (mode == EditorMode.EDITING) BlockView.Mode.EDIT else BlockView.Mode.READ,
id = block.id,
text = content.text,
@ -315,7 +315,7 @@ class DefaultBlockViewRenderer(
focus: Focus,
content: Content.Text,
indent: Int
): BlockView.HeaderTwo = BlockView.HeaderTwo(
): BlockView.Header.Two = BlockView.Header.Two(
mode = if (mode == EditorMode.EDITING) BlockView.Mode.EDIT else BlockView.Mode.READ,
id = block.id,
text = content.text,
@ -334,7 +334,7 @@ class DefaultBlockViewRenderer(
focus: Focus,
content: Content.Text,
indent: Int
): BlockView.HeaderOne = BlockView.HeaderOne(
): BlockView.Header.One = BlockView.Header.One(
mode = if (mode == EditorMode.EDITING) BlockView.Mode.EDIT else BlockView.Mode.READ,
id = block.id,
text = content.text,

View file

@ -1509,7 +1509,7 @@ class PageViewModelTest {
text = paragraph.content<Block.Content.Text>().text,
backgroundColor = paragraph.content<Block.Content.Text>().backgroundColor
),
BlockView.HeaderOne(
BlockView.Header.One(
id = new.id,
text = new.content<Block.Content.Text>().text,
backgroundColor = new.content<Block.Content.Text>().backgroundColor,