mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
Epic with sets and relations + new app flavors (stable, experimental) (#1048)
This commit is contained in:
parent
4f540aa356
commit
31d820c4dd
911 changed files with 51701 additions and 3827 deletions
|
@ -50,6 +50,7 @@ dependencies {
|
|||
def unitTestDependencies = rootProject.ext.unitTesting
|
||||
|
||||
implementation project(':data')
|
||||
implementation project(':core-models')
|
||||
|
||||
implementation applicationDependencies.kotlin
|
||||
implementation applicationDependencies.coroutinesAndroid
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.anytypeio.anytype.clipboard
|
||||
|
||||
import android.content.Context
|
||||
import com.anytypeio.anytype.core_models.Block
|
||||
import com.anytypeio.anytype.data.auth.mapper.Serializer
|
||||
import com.anytypeio.anytype.data.auth.model.BlockEntity
|
||||
import com.anytypeio.anytype.data.auth.repo.clipboard.ClipboardDataStore
|
||||
|
||||
class AnytypeClipboardStorage(
|
||||
|
@ -10,7 +10,7 @@ class AnytypeClipboardStorage(
|
|||
private val serializer: Serializer
|
||||
) : ClipboardDataStore.Storage {
|
||||
|
||||
override fun persist(blocks: List<BlockEntity>) {
|
||||
override fun persist(blocks: List<Block>) {
|
||||
val serialized = serializer.serialize(blocks)
|
||||
context.openFileOutput(CLIPBOARD_FILE_NAME, Context.MODE_PRIVATE).use {
|
||||
it.write(serialized)
|
||||
|
@ -18,7 +18,7 @@ class AnytypeClipboardStorage(
|
|||
}
|
||||
}
|
||||
|
||||
override fun fetch(): List<BlockEntity> {
|
||||
override fun fetch(): List<Block> {
|
||||
val stream = context.openFileInput(CLIPBOARD_FILE_NAME)
|
||||
val blob = stream.use { it.readBytes() }
|
||||
return serializer.deserialize(blob)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue