mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
Relations | Add/Remove from featured (#1670)
This commit is contained in:
parent
4c3e2ba5a7
commit
d47cd02686
14 changed files with 217 additions and 28 deletions
|
@ -455,4 +455,14 @@ class BlockDataRepository(
|
|||
|
||||
override suspend fun setObjectTypeToObject(ctx: Id, typeId: Id): Payload =
|
||||
factory.remote.setObjectTypeToObject(ctx = ctx, typeId = typeId)
|
||||
|
||||
override suspend fun addToFeaturedRelations(
|
||||
ctx: Id,
|
||||
relations: List<Id>
|
||||
): Payload = factory.remote.addToFeaturedRelations(ctx, relations)
|
||||
|
||||
override suspend fun removeFromFeaturedRelations(
|
||||
ctx: Id,
|
||||
relations: List<Id>
|
||||
): Payload = factory.remote.removeFromFeaturedRelations(ctx, relations)
|
||||
}
|
|
@ -175,4 +175,7 @@ interface BlockDataStore {
|
|||
suspend fun addRelationToBlock(command: Command.AddRelationToBlock): Payload
|
||||
|
||||
suspend fun setObjectTypeToObject(ctx: Id, typeId: Id): Payload
|
||||
|
||||
suspend fun addToFeaturedRelations(ctx: Id, relations: List<Id>): Payload
|
||||
suspend fun removeFromFeaturedRelations(ctx: Id, relations: List<Id>): Payload
|
||||
}
|
|
@ -175,4 +175,7 @@ interface BlockRemote {
|
|||
suspend fun addRelationToBlock(command: Command.AddRelationToBlock): Payload
|
||||
|
||||
suspend fun setObjectTypeToObject(ctx: Id, typeId: Id): Payload
|
||||
|
||||
suspend fun addToFeaturedRelations(ctx: Id, relations: List<Id>): Payload
|
||||
suspend fun removeFromFeaturedRelations(ctx: Id, relations: List<Id>): Payload
|
||||
}
|
|
@ -390,4 +390,14 @@ class BlockRemoteDataStore(private val remote: BlockRemote) : BlockDataStore {
|
|||
|
||||
override suspend fun setObjectTypeToObject(ctx: Id, typeId: Id): Payload =
|
||||
remote.setObjectTypeToObject(ctx = ctx, typeId = typeId)
|
||||
|
||||
override suspend fun addToFeaturedRelations(
|
||||
ctx: Id,
|
||||
relations: List<Id>
|
||||
): Payload = remote.addToFeaturedRelations(ctx, relations)
|
||||
|
||||
override suspend fun removeFromFeaturedRelations(
|
||||
ctx: Id,
|
||||
relations: List<Id>
|
||||
): Payload = remote.removeFromFeaturedRelations(ctx, relations)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue