mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-1882 Sharing Extension | Enhancement | Add origin source when adding content from sharing extension (#713)
This commit is contained in:
parent
e8af8c958b
commit
33215bae63
9 changed files with 52 additions and 18 deletions
|
@ -10,7 +10,6 @@ import com.anytypeio.anytype.core_models.DVFilter
|
|||
import com.anytypeio.anytype.core_models.DVSort
|
||||
import com.anytypeio.anytype.core_models.DVViewer
|
||||
import com.anytypeio.anytype.core_models.DVViewerType
|
||||
import com.anytypeio.anytype.core_models.FileLimits
|
||||
import com.anytypeio.anytype.core_models.Id
|
||||
import com.anytypeio.anytype.core_models.Key
|
||||
import com.anytypeio.anytype.core_models.NodeUsageInfo
|
||||
|
@ -174,10 +173,11 @@ class BlockMiddleware(
|
|||
): Payload = middleware.blockBookmarkCreateAndFetch(command)
|
||||
|
||||
override suspend fun createBookmarkObject(
|
||||
space: Id, url: Url
|
||||
space: Id, url: Url, details: Struct
|
||||
): Id = middleware.objectCreateBookmark(
|
||||
space = space,
|
||||
url = url
|
||||
url = url,
|
||||
details = details
|
||||
)
|
||||
|
||||
override suspend fun fetchBookmarkObject(
|
||||
|
|
|
@ -903,9 +903,16 @@ class Middleware @Inject constructor(
|
|||
}
|
||||
|
||||
@Throws(Exception::class)
|
||||
fun objectCreateBookmark(space: Id, url: Url): Id {
|
||||
fun objectCreateBookmark(
|
||||
space: Id,
|
||||
url: Url,
|
||||
details: Struct
|
||||
): Id {
|
||||
val request = Rpc.Object.CreateBookmark.Request(
|
||||
details = mapOf(Relations.SOURCE to url),
|
||||
details = buildMap {
|
||||
put(Relations.SOURCE, url)
|
||||
putAll(details)
|
||||
},
|
||||
spaceId = space
|
||||
)
|
||||
if (BuildConfig.DEBUG) logRequest(request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue