1
0
Fork 0
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:
Evgenii Kozlov 2022-12-01 14:13:41 +03:00 committed by GitHub
parent 64e5e8c6dd
commit ef6eeac53c
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 461 additions and 192 deletions

View file

@ -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
)