1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-2345 Multiplayer | Enhancement | Support share limit restrictions (#1134)

This commit is contained in:
Evgenii Kozlov 2024-04-18 15:19:16 +02:00 committed by uburoiubu
parent d81c36ff92
commit e77b98697d
No known key found for this signature in database
GPG key ID: C8FB80E0A595FBB6
12 changed files with 566 additions and 74 deletions

View file

@ -1,5 +1,6 @@
package com.anytypeio.anytype.core_models
import com.anytypeio.anytype.core_models.multiplayer.SpaceAccessType
import com.anytypeio.anytype.test_utils.MockDataFactory
fun StubDataView(
@ -92,4 +93,19 @@ fun StubFilter(
condition = condition,
quickOption = quickOption,
value = value
)
fun StubSpaceView(
id: Id = MockDataFactory.randomUuid(),
targetSpaceId: Id = MockDataFactory.randomUuid(),
spaceAccessType: SpaceAccessType = SpaceAccessType.DEFAULT,
sharedSpaceLimit: Int? = null
) = ObjectWrapper.SpaceView(
map = mapOf(
Relations.ID to id,
Relations.TARGET_SPACE_ID to targetSpaceId,
Relations.SPACE_ACCESS_TYPE to spaceAccessType.code.toDouble(),
Relations.SHARED_SPACES_LIMIT to sharedSpaceLimit?.toDouble()
)
)