mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-496 Sets | Enhancement | Creating object in sets aggregated by relations (#2731)
This commit is contained in:
parent
64e5e8c6dd
commit
ef6eeac53c
23 changed files with 461 additions and 192 deletions
|
@ -0,0 +1,44 @@
|
|||
package com.anytypeio.anytype.core_models
|
||||
|
||||
import com.anytypeio.anytype.test_utils.MockDataFactory
|
||||
|
||||
fun StubDataView(
|
||||
id : Id = MockDataFactory.randomUuid(),
|
||||
views: List<DVViewer> = emptyList(),
|
||||
relations: List<RelationLink> = emptyList(),
|
||||
sources: List<Id> = emptyList()
|
||||
) : Block = Block(
|
||||
id = id,
|
||||
content = DV(
|
||||
sources = sources,
|
||||
relations = emptyList(),
|
||||
relationsIndex= relations,
|
||||
viewers = views
|
||||
),
|
||||
children = emptyList(),
|
||||
fields = Block.Fields.empty()
|
||||
)
|
||||
|
||||
fun StubDataViewView(
|
||||
id : Id = MockDataFactory.randomUuid(),
|
||||
filters: List<DVFilter> = emptyList(),
|
||||
sorts: List<DVSort> = emptyList(),
|
||||
type: DVViewerType = DVViewerType.GRID,
|
||||
name: String = MockDataFactory.randomString(),
|
||||
viewerRelations: List<DVViewerRelation> = emptyList()
|
||||
) : DVViewer = DVViewer(
|
||||
id = id,
|
||||
filters = filters,
|
||||
sorts = sorts,
|
||||
type = type,
|
||||
name = name,
|
||||
viewerRelations = viewerRelations
|
||||
)
|
||||
|
||||
fun StubDataViewViewRelation(
|
||||
key: Key = MockDataFactory.randomUuid(),
|
||||
isVisible: Boolean = MockDataFactory.randomBoolean()
|
||||
) : DVViewerRelation = DVViewerRelation(
|
||||
key = key,
|
||||
isVisible = isVisible
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue