mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-11 10:18:05 +09:00
parent
ee097e37b0
commit
48178cff20
15 changed files with 276 additions and 192 deletions
|
@ -25,7 +25,7 @@ fun Block.Content.File.toPictureView(
|
|||
indent = indent,
|
||||
mode = mode
|
||||
)
|
||||
Block.Content.File.State.UPLOADING -> BlockView.Picture.Upload(
|
||||
Block.Content.File.State.UPLOADING -> BlockView.Upload.Picture(
|
||||
id = id,
|
||||
indent = indent,
|
||||
mode = mode
|
||||
|
@ -54,12 +54,12 @@ fun Block.Content.File.toVideoView(
|
|||
indent: Int,
|
||||
mode: BlockView.Mode
|
||||
): BlockView = when (state) {
|
||||
Block.Content.File.State.EMPTY -> BlockView.MediaPlaceholder.File(
|
||||
Block.Content.File.State.EMPTY -> BlockView.MediaPlaceholder.Video(
|
||||
id = id,
|
||||
indent = indent,
|
||||
mode = mode
|
||||
)
|
||||
Block.Content.File.State.UPLOADING -> BlockView.Video.Upload(
|
||||
Block.Content.File.State.UPLOADING -> BlockView.Upload.Video(
|
||||
id = id,
|
||||
indent = indent,
|
||||
mode = mode
|
||||
|
@ -93,7 +93,7 @@ fun Block.Content.File.toFileView(
|
|||
indent = indent,
|
||||
mode = mode
|
||||
)
|
||||
Block.Content.File.State.UPLOADING -> BlockView.File.Upload(
|
||||
Block.Content.File.State.UPLOADING -> BlockView.Upload.File(
|
||||
id = id,
|
||||
indent = indent,
|
||||
mode = mode
|
||||
|
|
|
@ -142,7 +142,7 @@ class MapperExtensionKtTest {
|
|||
type = type
|
||||
)
|
||||
|
||||
val expected = BlockView.File.Upload(id = id, indent = indent)
|
||||
val expected = BlockView.Upload.File(id = id, indent = indent)
|
||||
val actual = block.toFileView(id, urlBuilder, indent, mode)
|
||||
|
||||
assertEquals(expected, actual)
|
||||
|
@ -285,7 +285,7 @@ class MapperExtensionKtTest {
|
|||
type = type
|
||||
)
|
||||
|
||||
val expected = BlockView.Picture.Upload(id = id, indent = indent)
|
||||
val expected = BlockView.Upload.Picture(id = id, indent = indent)
|
||||
val actual = block.toPictureView(id, urlBuilder, indent, mode)
|
||||
|
||||
assertEquals(expected, actual)
|
||||
|
@ -409,7 +409,7 @@ class MapperExtensionKtTest {
|
|||
type = type
|
||||
)
|
||||
|
||||
val expected = BlockView.MediaPlaceholder.File(
|
||||
val expected = BlockView.MediaPlaceholder.Video(
|
||||
id = id,
|
||||
indent = indent
|
||||
)
|
||||
|
@ -447,7 +447,7 @@ class MapperExtensionKtTest {
|
|||
type = type
|
||||
)
|
||||
|
||||
val expected = BlockView.Video.Upload(
|
||||
val expected = BlockView.Upload.Video(
|
||||
id = id,
|
||||
indent = indent
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue